I HAD IT WORKING! MySQL under SuSE 9.0 Woes
With everyone's help, I had MySQL working; I could get into that monitor program, and do things like: show databases; show tables; use <databasename>; And so on. In other words, It Was Working! Now however, it will NOT work, AND I cannot make it start! I went into YAST and tried to restart MySQL, but this only gave me an error of "Failed". What good is it, if I have to REMOVE THE WHOLE PROGRAM every time I want to use it? It was working yesterday, and now, today after starting my computer up, it is NOT working! ALSO I can't get phpMyAdmin to work; I tried to install it using YAST as someone said to do, but it didn't put anything into /usr/bin that I could run. I don't understand how it works! I did what it says at the page about phpMyAdmin, but it I get all sorts of errors about not being a server, or something. And Apache? Forget it! Check this out; this is exactly the routine I have been trying to follow to make this thing work. It did just fine the other day...I went through and tried all the ideas that everyone had given me before: ============================================= markvii@linux:~> mysql -u pampaluz -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/ mysql/mysql.sock' (2) markvii@linux:~> su Password: linux:/home/markvii # mysqld --standalone mysqld: ERROR: unknown variable 'innodb_data_home_dir=/var/lib/mysql/' linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL failed linux:/home/markvii # /etc/init.d/mysql restart Restarting service MySQL Shutting down service mysql done Starting service MySQL failed linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # chkconfig -s mysql on linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL failed linux:/home/markvii # chkconfig -l mysql mysql 0:off 1:off 2:on 3:on 4:off 5:on 6:off linux:/home/markvii # ============================================= Please, I hope someone will know what to do. I mean, I had it working *once*, then it stopped, and I had to remove EVERYTHING and start over; and then I thought I had it made! It worked; up until yesterday when I was done, and I did "shutdown -h now". Today I brought up the system (actually, just a notebook computer, a Compaq Presario 906US), and MySQL won't work! It won't start, just like before when I couldn't make it work, and had to re-install. Does EVERYONE re-install, every time they want to use it? How do you make a database in a single day and get all the use from it that you need in that one day? This doesn't make sense! Thanks in advance, --Mark VII (who is considering switching back to Debian--I had no graphics, no X under Debian because I could not configure my notebook under it; but at least I had a console, and I'll bet I could get MySQL to work there, with "apt-get"!)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 13 April 2004 09:19, Mark Seven Smith wrote:
With everyone's help, I had MySQL working; I could get into that monitor program, and do things like: <snip>
And so on. In other words, It Was Working!
Now however, it will NOT work, AND I cannot make it start! I went into YAST and tried to restart MySQL, but this only gave me an error of "Failed".
This may be a dim question, but what does /var/lib/mysql/mysql.log say when you try starting it? "040401 12:56:42 mysqld started /usr/sbin/mysqld: ready for connections. Version: '4.0.15' socket: '/var/lib/mysql/mysql.sock' port: 3306" - - is what I get in the log when starting a (working) mysqld under 9.0 best wishes. Gideon Hallett. diogenes@freeuk.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAe6WJ9kmEmNaPyk0RAmgHAJ9XdWr6UnKTz9KSxebYJ9pn73j5UQCffq7d PApV+tdYeWM5RYr8PKfpPjE= =eKbA -----END PGP SIGNATURE-----
On Tuesday 13 April 2004 01:32, Gideon Hallett typed: [SNIP] usual stuff]
This may be a dim question, but what does /var/lib/mysql/mysql.log say when you try starting it?
"040401 12:56:42 mysqld started /usr/sbin/mysqld: ready for connections. Version: '4.0.15' socket: '/var/lib/mysql/mysql.sock' port: 3306"
- is what I get in the log when starting a (working) mysqld under 9.0
OK: here I will run the start thingy, and then run it again, and then show the last two sets of error messages for those two commands (a set of messages for these errors takes around 12 lines, so "tail -12" should do it, or "tail -24" for both). BTW I do not have a "/var/lib/mysql/mysql.log" file...it is "/ var/lib/mysql/mysqld.log", I wonder why? linux:~ # rcmysql start Starting service MySQL failed linux:~ # /etc/init.d/mysql start Starting service MySQL failed linux:/var/lib/mysql # tail -24 /var/lib/mysql/mysqld.log 040414 03:06:27 mysqld started InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 20971520 bytes! 040414 3:06:29 Can't init databases 040414 3:06:29 Aborting 040414 3:06:29 InnoDB: Warning: shutting down a not properly started InnoDB: or created database! 040414 3:06:29 /usr/sbin/mysqld-max: Shutdown Complete 040414 03:06:29 mysqld ended 040414 03:06:44 mysqld started InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 5242880 bytes InnoDB: than specified in the .cnf file 0 20971520 bytes! 040414 3:06:44 Can't init databases 040414 3:06:44 Aborting 040414 3:06:44 InnoDB: Warning: shutting down a not properly started InnoDB: or created database! 040414 3:06:44 /usr/sbin/mysqld-max: Shutdown Complete 040414 03:06:44 mysqld ended linux:/var/lib/mysql # So, you see: those are the error messages for the two commands that I issued just now. (I entered blank lines above for readability). Thanks, --Mark VII pampaluz@cox.net
Mark Seven Smith wrote:
/.../
it is NOT working! ALSO I can't get phpMyAdmin to work; I tried to install it using YAST as someone said to do, but it didn't put anything into /usr/bin that I could run. I don't understand how it works!
Install phpMyAdmin via YaST, configure the file 'config.inc.php' in '/srv/www/htdocs/phpMyAdmin' (*) and run phpMyAdmin in a web browser: http://localhost/phpMyAdmin/index.php (*) These are my values in 'config.inc.php': $cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/'; $cfg['Servers'][$i]['auth_type'] = 'http'; PhpMyAdmin requires php running which is an Apache-module, so you have to install Apache as well. Installing Apache or Apache2 via YaST should be easy, if everything works as it's supposed to. This is what I myself have installed when it comes to Apache2: apache2 apache2-doc apache2-example-pages apache2-prefork libapr0 This is what I have installed related to php: apache2-mod_php4 mod_php4-core phpdoc phpMyAdmin Get Apache2 starting at boot via the Editor for runlevels in YaST Control Center. Good luck. /Lars I did what it says at
the page about phpMyAdmin, but it I get all sorts of errors about not being a server, or something. And Apache? Forget it!
Check this out; this is exactly the routine I have been trying to follow to make this thing work. It did just fine the other day...I went through and tried all the ideas that everyone had given me before:
============================================= markvii@linux:~> mysql -u pampaluz -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/ mysql/mysql.sock' (2) markvii@linux:~> su Password: linux:/home/markvii # mysqld --standalone mysqld: ERROR: unknown variable 'innodb_data_home_dir=/var/lib/mysql/' linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL failed linux:/home/markvii # /etc/init.d/mysql restart Restarting service MySQL Shutting down service mysql done Starting service MySQL failed linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # chkconfig -s mysql on linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL failed linux:/home/markvii # chkconfig -l mysql mysql 0:off 1:off 2:on 3:on 4:off 5:on 6:off linux:/home/markvii # =============================================
Please, I hope someone will know what to do. I mean, I had it working *once*, then it stopped, and I had to remove EVERYTHING and start over; and then I thought I had it made! It worked; up until yesterday when I was done, and I did "shutdown -h now". Today I brought up the system (actually, just a notebook computer, a Compaq Presario 906US), and MySQL won't work! It won't start, just like before when I couldn't make it work, and had to re-install. Does EVERYONE re-install, every time they want to use it? How do you make a database in a single day and get all the use from it that you need in that one day? This doesn't make sense!
Thanks in advance,
--Mark VII (who is considering switching back to Debian--I had no graphics, no X under Debian because I could not configure my notebook under it; but at least I had a console, and I'll bet I could get MySQL to work there, with "apt-get"!)
Hi!
First of all, I have to remind you that expressions like "who is considering
switching back to Debian..." won't help much (won't hurt, either, because
we're all grown ups, not kids who's having a fight over who's toy is better)
About your little issue - why I can *BET* that you altered (by hand or
otherways) /etc/my.cnf and/or the directory /var/lib/mysql ??? I am waiting
for confirmation of this and then we'll talk about it...
Check out my config:
/etc/my.cnf
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
log
big-tables
log-error
local-infile = 1
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
myisam_sort_buffer_size = 8M
server-id = 1
[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
local-infile = 1
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
In order to work, you *HAVE* to be SURE that ALL the files within
/var/lib/mysql are owned by mysql:daemon or mysql:root - it's a MUST!!!
you can check it with ls -lia /var/lib/mysql and repair it entering the
following command: chown -R mysql:daemon /var/lib/mysql
Looking for your *PERTINENT* comments...
Radu
----- Original Message -----
From: "Mark Seven Smith"
With everyone's help, I had MySQL working; I could get into that monitor program, and do things like:
show databases;
show tables;
use <databasename>;
And so on. In other words, It Was Working!
Now however, it will NOT work, AND I cannot make it start! I went into YAST and tried to restart MySQL, but this only gave me an error of "Failed". What good is it, if I have to REMOVE THE WHOLE PROGRAM every time I want to use it? It was working yesterday, and now, today after starting my computer up, it is NOT working! ALSO I can't get phpMyAdmin to work; I tried to install it using YAST as someone said to do, but it didn't put anything into /usr/bin that I could run. I don't understand how it works! I did what it says at the page about phpMyAdmin, but it I get all sorts of errors about not being a server, or something. And Apache? Forget it!
Check this out; this is exactly the routine I have been trying to follow to make this thing work. It did just fine the other day...I went through and tried all the ideas that everyone had given me before:
============================================= markvii@linux:~> mysql -u pampaluz -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/ mysql/mysql.sock' (2) markvii@linux:~> su Password: linux:/home/markvii # mysqld --standalone mysqld: ERROR: unknown variable 'innodb_data_home_dir=/var/lib/mysql/' linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL
failed
linux:/home/markvii # /etc/init.d/mysql restart Restarting service MySQL Shutting down service mysql
done
Starting service MySQL
failed
linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # chkconfig -s mysql on linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # /etc/init.d/mysql start Starting service MySQL
failed
linux:/home/markvii # chkconfig -l mysql mysql 0:off 1:off 2:on 3:on 4:off 5:on 6:off linux:/home/markvii # =============================================
Please, I hope someone will know what to do. I mean, I had it working *once*, then it stopped, and I had to remove EVERYTHING and start over; and then I thought I had it made! It worked; up until yesterday when I was done, and I did "shutdown -h now". Today I brought up the system (actually, just a notebook computer, a Compaq Presario 906US), and MySQL won't work! It won't start, just like before when I couldn't make it work, and had to re-install. Does EVERYONE re-install, every time they want to use it? How do you make a database in a single day and get all the use from it that you need in that one day? This doesn't make sense!
Thanks in advance,
--Mark VII (who is considering switching back to Debian--I had no graphics, no X under Debian because I could not configure my notebook under it; but at least I had a console, and I'll bet I could get MySQL to work there, with "apt-get"!)
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 13 April 2004 05:50, Radu Voicu typed:
Hi!
First of all, I have to remind you that expressions like "who is considering switching back to Debian..." won't help much (won't hurt, either, because we're all grown ups, not kids who's having a fight over who's toy is better)
Actually I was just sort of thinking out loud; but it is inappropriate for a non-Debian mailing list. I am sorry.
About your little issue - why I can *BET* that you altered (by hand or otherways) /etc/my.cnf and/or the directory /var/lib/mysql ??? I am waiting for confirmation of this and then we'll talk about it...
Yes, I altered it--to use InnoDB tables, because that's what the tutorial wants me to do. IF you go in and check for yourself, you will see that SuSE has provided the necessary instructions for InnoDB tables already--in the #COMMENTS it says you are to "uncomment the following lines" for InnoDB table, and that is what I have done. That's *ALL* I have done in that file...
Check out my config:
/etc/my.cnf [client] port = 3306 socket = /var/lib/mysql/mysql.sock
[mysqld] log big-tables log-error local-infile = 1 port = 3306 socket = /var/lib/mysql/mysql.sock skip-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K myisam_sort_buffer_size = 8M
[SNIP] Mine is the same: here is the corresponding part of mine (corresponding to the part above:) # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock skip-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K myisam_sort_buffer_size = 8M ...And so on and so forth. NOW, however, here is the part that I modfied: as you can see, all I did was to modify these lines by removing the "#" symbols, and I changed a couple of the values for the memory sizes, according to what the Tutorial said. It said you could use "this" value if you had as much as 128 megs of RAM (and I have 256 MB). So, I felt safe in doing so, and it did work fine: # 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 = 70M innodb_additional_mem_pool_size = 10M # Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 20M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 50 The Tutorial left it up to us to modify the following if we wanted; I felt that it was sort of silly because it wouldn't allow you to actually make anything that worked! And I felt it would be better to get my database started as soon as possible, and learn as I go, while inputing the books I need to catalog: # Remove the next comment character if you are not familiar with SQL #safe-updates All this does is prevent you from deleting a critical database accidentally. Since I didn't even have a database that was even mildly important, I was not worried about it.
In order to work, you *HAVE* to be SURE that ALL the files within /var/lib/mysql are owned by mysql:daemon or mysql:root - it's a MUST!!!
Here they are: linux:/var/lib/mysql # ls -lia total 20558 234907 drwxr-xr-x 4 mysql daemon 488 2004-04-13 20:43 . 23 drwxr-xr-x 41 root root 1072 2004-04-13 04:31 .. 246711 -rw-rw---- 1 mysql daemon 25088 2004-03-28 18:13 ib_arch_log_0000000000 246708 -rw-rw---- 1 mysql daemon 10485760 2004-04-10 09:26 ibdata1 246709 -rw-rw---- 1 mysql daemon 5242880 2004-04-10 09:26 ib_logfile0 246710 -rw-rw---- 1 mysql daemon 5242880 2004-03-28 18:13 ib_logfile1 98547 -rw-rw---- 1 mysql daemon 3040 2004-04-13 20:43 linux-slow.log 238969 drwx------ 2 mysql root 528 2004-03-28 18:13 mysql 262556 -rw-rw---- 1 mysql root 898 2004-04-13 20:43 mysqld.log 262521 -rw-rw---- 1 mysql root 194 2004-04-08 03:27 mysqld.log-20040408.gz 262568 -rw-rw---- 1 mysql root 188 2004-04-08 12:14 mysqld.log-20040409.gz 251154 -rw-rw---- 1 mysql root 477 2004-04-11 01:37 mysqld.log-20040411.gz 247414 -rw-rw---- 1 mysql root 358 2004-04-12 11:33 mysqld.log-20040412.gz 247391 -rw-rw---- 1 mysql root 491 2004-04-13 01:19 mysqld.log-20040413.gz 238970 drwx------ 2 mysql root 48 2004-03-28 18:13 test linux:/var/lib/mysql #
you can check it with ls -lia /var/lib/mysql and repair it entering the following command: chown -R mysql:daemon /var/lib/mysql
Looking for your *PERTINENT* comments...
Well, I cannot think of anything else at the moment; thanks for emphasizing these things, because although they're correct (they have no problems), I wouldn't have necessarily thought of checking them. Especially the part about how those /var/lib/mysql files must be owned by mysql:daemon or mysql:root. But, they are...and my /etc/my.cnf file is OK, which I already knew, because I had already worked up to chapter 6 in the tutorial book the other day, creating example InnoDB tables and such; and this would not have worked, apparently, if that my.cnf file was NOT set up properly. And I knew that I had not changed anything important...that's why I felt that what I said WAS "pertinent". I had said that it had been WORKING, just fine, and now the daemon won't start--there IS NO socket without a running daemon! This is something that I did not know yesterday, and it is WHY I get the error message that I get: markvii@linux:~> mysql -u pampaluz -p Enter password: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/ mysql/mysql.sock' (2) markvii@linux:~>su Password: linux:/home/markvii # rcmysql start Starting service MySQL failed linux:/home/markvii # rcmysql status Checking for service MySQL: unused linux:/home/markvii # You see? And if I go and try to "Enable" MySQL in the Runlevel Editor in YAST, it hangs for a few seconds, and then tells me that it "FAIL"s. And at the suggestion of someone one time, I un-installed EVERYTHING, and re-installed (all the MySQL, and Apache, and php, and all of that), and re-installed it, and that's when it began working enough for me to get up to chapter six in the Tutorial book I am following, but now I am back where I started--what is wrong? Do you see why this is really bothering me? The only solution that has really worked so far, is to uninstall everything, delete my /var/lib/mysql (which kills any database I may have been working on), and then start over. Is this how people are using MySQL? If I seem upset then I'm sorry; but if someone is going to try and help me, it would useful if they would actually listen to the question, and see how I have already tried typing "rcmysql start" at the root prompt, instead of telling me that this is the solution, because it is not. Thanks, if you have read this far, and I especially thank you if you can see a way to help me out with this...someday I may be there to help you out; I am generous to a fault (but it would have to be something I could do; like typing a lot of stuff that you don't want to have to type up yourself; I am bedridden, and have a lot of time on my hands...) Thanks again, --Mark Seven Smith pampaluz@cox.net
participants (4)
-
Gideon Hallett
-
Lars Noren
-
Mark Seven Smith
-
Radu Voicu