You are not logged in.

#1 2009-11-18 23:07:42

doorknob60
Member
Registered: 2008-09-29
Posts: 404

[SOLVED]MySQL doesn't work anymore

It starts fine:

[root@server ~]# /etc/rc.d/mysqld restart
:: Stopping MySQL                                                          [DONE]
:: Starting MySQL                                                          [DONE]
[root@server ~]#

BUT, it no longer works:
http://doorknob60.is-a-geek.org/wiki
http://doorknob60.is-a-geek.org/wordpress
Both give errors, as well as Phpmyadmin. I can't seem to find any relevant log files either. I tried some random stuff, but nothing seems to work. I just got MySQL set up on this box about 2 days ago, then an update comes around and messes it up again hmm

Last edited by doorknob60 (2009-11-18 23:57:58)

Offline

#2 2009-11-18 23:13:56

SiB
Member
Registered: 2008-07-03
Posts: 38

Re: [SOLVED]MySQL doesn't work anymore

Did you read the front page? You need to update the PHP config to point to the new location of the pid and sock files.

http://www.archlinux.org/news/473/

Last edited by SiB (2009-11-18 23:18:12)

Offline

#3 2009-11-18 23:18:08

doorknob60
Member
Registered: 2008-09-29
Posts: 404

Re: [SOLVED]MySQL doesn't work anymore

Yes, I did read that. Even after messing with config files it doesn't work. And PHP config? I'll assume that's a typo. What all do you have to change? Everything looks fine on my current my.cnf file, I think at least.

# mysql config file for medium systems.
#                                      
# This is for a system with little memory (32M - 64M) where MySQL plays
# a important part and systems up to 128M where MySQL is used together with
# other programs (like a web server)                                       
#                                                                          
# One can in this file use all long options that the program supports.     
# If you want to know which options a program support, run the program     
# with --help option.                                                      

# The following options will be passed to all MySQL clients
[client]                                                   
password        = ~password removed~                                  
port            = 3306                                     
socket          = /var/run/mysqld/mysqld.sock              

# Here follows entries for some specific programs

# The MySQL server
[mysqld]          
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql 
pid_file        = /var/run/mysqld/mysqld.pid        
skip-locking                                 
key_buffer = 16M                             
max_allowed_packet = 1M                      
table_cache = 64                             
sort_buffer_size = 512K                      
net_buffer_length = 16K                      
myisam_sort_buffer_size = 8M                 

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.    
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows      
# (via the "enable-named-pipe" option) will render mysqld useless!         
#                                                                          
#skip-networking                                                           

# Replication Master Server (default)
# binary logging is required for replication
#log-bin                                    

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set  
# but will not function as a master if omitted
server-id       = 1                           

# Replication Slave (comment out master section to use this)
#                                                           
# To configure this host as a replication slave, you can choose between
# two methods :                                                        
#                                                                      
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:                                                    
#                                                                      
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,          
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;                  
#                                                                      
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).             
#                                                                      
#    Example:                                                          
#                                                                      
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,    
#    MASTER_USER='joe', MASTER_PASSWORD='secret';                      
#                                                                      
# OR                                                                   
#                                                                      
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later     
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.   
#    For that reason, you may want to leave the lines below untouched      
#    (commented) and instead use CHANGE MASTER TO (see above)              
#                                                                          
# required unique id between 2 and 2^32 - 1                                
# (and different from the master)                                          
# defaults to 2 if master-host is set                                      
# but will not function as a slave if omitted                              
#server-id       = 2                                                       
#                                                                          
# The replication master for this slave - required                         
#master-host     =   <hostname>                                            
#                                                                          
# The username the slave will use for authentication when connecting       
# to the master - required                                                 
#master-user     =                                                     
#                                                                          
# The password the slave will authenticate with when connecting to         
# the master - required                                                    
#master-password =                                                    
#                                                                          
# The port the master is listening on.                                     
# optional - defaults to 3306                                              
#master-port     =  <port>                                                 
#                                                                          
# binary logging - not required for slaves, but recommended                
#log-bin                                                                   

# Point the following paths to different dedicated disks
#tmpdir         = /tmp/                                 
#log-update     = /path-to-dedicated-directory/hostname 

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M                                 
#bdb_max_lock = 10000                                

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql                  
#innodb_data_file_path = ibdata1:10M:autoextend         
#innodb_log_group_home_dir = /var/lib/mysql             
#innodb_log_arch_dir = /var/lib/mysql                   
# You can set .._buffer_pool_size up to 50 - 80 %       
# of RAM but beware of setting memory usage too high    
#innodb_buffer_pool_size = 16M                          
#innodb_additional_mem_pool_size = 2M                   
# Set .._log_file_size to 25 % of buffer pool size      
#innodb_log_file_size = 5M                              
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
#no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

Also, is there some place I'm missing when looking for error logs? I'm looking in /var/log and see nothing related to mysql

Last edited by doorknob60 (2009-11-18 23:28:47)

Offline

#4 2009-11-18 23:47:56

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: [SOLVED]MySQL doesn't work anymore

You need to edit the php.ini file located in the /etc/php/ folder.

Birger smile

Last edited by MindTooth (2009-11-18 23:48:29)

Offline

#5 2009-11-18 23:57:14

doorknob60
Member
Registered: 2008-09-29
Posts: 404

Re: [SOLVED]MySQL doesn't work anymore

Wow, it would've been nice if somewhere it specified that, because to me, that's not obvious at all. I never needed to edit that part of the php.ini file until just now (all I had to do before was uncomment the extension = mysql.so line or whatever). Thanks though, it seems to be working now smile

Offline

#6 2009-11-19 00:03:51

SiB
Member
Registered: 2008-07-03
Posts: 38

Re: [SOLVED]MySQL doesn't work anymore

Yea it's weird, I clearly remember seeing on the front page that you needed to edit the php.ini but now it's gone!

Offline

#7 2009-11-19 01:33:22

doorknob60
Member
Registered: 2008-09-29
Posts: 404

Re: [SOLVED]MySQL doesn't work anymore

Weird, it's not even in the mailing list email that I got though...

Offline

#8 2009-11-19 10:15:14

Korab
Member
From: Poland
Registered: 2007-06-12
Posts: 24
Website

Re: [SOLVED]MySQL doesn't work anymore

Resolved, how???

I have set mysql.default_socket = /var/run/mysqld/mysqld.sock in php.ini, and socket = /var/run/mysqld/mysqld.sock in my.conf (double set, client and mysqld).

httpd, and mysqld restarted without problems. When i try:

# mysql_config --socket
/tmp/mysql.sock

why answer is /tmp/mysql.sock?

In phpMyAdmin I recive:
Error: 2002  (CR_CONNECTION_ERROR)
Message: Can't connect to MySQL server


Korab

Offline

#9 2009-11-19 10:44:41

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: [SOLVED]MySQL doesn't work anymore

Did you do this for the MySQLi section also? Afaik, you don't need to edit my.cnf.

Birger smile

Offline

#10 2009-11-19 11:12:07

Korab
Member
From: Poland
Registered: 2007-06-12
Posts: 24
Website

Re: [SOLVED]MySQL doesn't work anymore

@MindTooth thank you, MySQLi section was missed. Now works perfectly  smile


Korab

Offline

#11 2009-11-19 12:05:47

Berseker
Member
From: Near Lecco, Italy
Registered: 2008-04-24
Posts: 258

Re: [SOLVED]MySQL doesn't work anymore

I updated the php.ini as requested but I still get the error of Korab.

edit I just had to restart also the apache server. Now works

Last edited by Berseker (2009-11-19 12:06:49)

Offline

#12 2009-11-19 16:25:25

Urfaust
Member
From: Germany
Registered: 2009-01-30
Posts: 164

Re: [SOLVED]MySQL doesn't work anymore

Still mysql refuses to start for me.:(
Edited php.ini, also the MySQLi section, my.cnf. Did  chown mysql:mysql /var/lib/mysql -R and restarted apache, but it does not work?
Any further ideas?


:: Starting MySQL                                                        [FAIL]

also

sudo mysql_config --socket
/tmp/mysql.sock

Last edited by Urfaust (2009-11-19 16:26:18)

Offline

#13 2009-11-19 16:29:47

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: [SOLVED]MySQL doesn't work anymore

@Urfaust
are you using mysql 5.1.41-2? check logs

Offline

#14 2009-11-19 16:38:43

Urfaust
Member
From: Germany
Registered: 2009-01-30
Posts: 164

Re: [SOLVED]MySQL doesn't work anymore

bash wrote:

@Urfaust
are you using mysql 5.1.41-2? check logs

Aaaaaaargh, I Syu'ed 10 minutes ago and mysql was updated, thought this was the last version but it is 5.1.41-1..
I'm waiting until my mirror is in sync and put myself to shame until then. Thanks.

Offline

#15 2009-11-19 18:09:42

Eratosthenes
Member
Registered: 2009-11-02
Posts: 19

Re: [SOLVED]MySQL doesn't work anymore

Hi all--

fixing phpadmin, mysql query browser, etc. was not a problem.

My problem is with the mysql python bindings = MySQLdb = mysql-python in pacman. Doing a "pacman -Ql mysql-python" does not find any files that look like a config file. Randomly browsing the *.py files doesn't find anything either. Can somebody point me in the right direction for fixning this? (BTW: sqlalchemy appears to be broken, too. I don't even want to think about that yet.)

Is there help in mysql-5.1.41-2? I'm still running mysql-5.1.41-1 and don't see -2 in my mirror. (In any case I am traveling and really, really bad download speed, so I don't really want to do an update.) I have temporarily fixed the problem by downgrading to mysql-5.1.39.

thanks

Offline

#16 2009-11-25 11:10:37

MW
Member
Registered: 2007-07-27
Posts: 127

Re: [SOLVED]MySQL doesn't work anymore

Could some please explain in layman terms what needs to be edited in /etc/php/php.ini ?

This is the first time I meddled with this and I have no idea what to edit where to get mysql to start up.

Offline

#17 2009-11-25 18:07:32

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: [SOLVED]MySQL doesn't work anymore

This should be fixed with the latest updates. I think that the PHP update also forces an update on the php.ini file. Either look for php.ini.pacsave or php.ini.pacnew.

Birger smile

Offline

Board footer

Powered by FluxBB