[Fwd: Re: Can't connect to local MySQL question]
--- Begin Message --- On 8/9/03 11:20 PM, "Andreas" <[EMAIL PROTECTED]> wrote: Andreas, Thanks for the help... The error log shows: 030810 14:52:48 mysqld started 030810 14:52:49 InnoDB: Started 030810 14:52:49 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 030810 14:52:49 Aborting 030810 14:52:49 InnoDB: Starting shutdown... 030810 14:52:51 InnoDB: Shutdown completed 030810 14:52:51 /usr/local/mysql/bin/mysqld: Shutdown Complete 030810 14:52:51 mysqld ended I've bought several books on php/mysql and they all get right into the programming aspects, and what I probably need to look for is a book that talks about the architecture. I can see that the first thing I really need to do, is get a good understanding of is all the pieces that make mysql work, what they do, how & when they get created. What tools to use, preferably GUI tools. I followed the instructions on the install, and re-installed, the deleted everything & installed again. ...and I have no clue why mysqld is unhappy about "Table 'mysql.host' doesn't exist". Where in the install, etc, process was it supposed to get created, and by which piece? I think I need to take three steps back, and figure out where the beginning is? Thanks for the help... Bill Hernandez Plano, Texas BTW, your comment about mysqld being a daemon, and mysql is the client really helped, puts things in perspective. Sort of client -> server which I can relate to... > Bill Hernandez wrote: > >> I followed the install instructions at http://entropy.ch , and was able to >> get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded >> Navicat and setup a password for the mysql user. I created a connection >> called myDatabase_connection to a database called myDatabase. I was able to >> get everything running OK. > > Did the server start and could you connect ? > > >> Today when I restarted the machine, I tried to launch the php program that I >> was running last night, and kept getting an error 2002 below. > > 1) Have the mysql daemon running > 2) connect with a client > > >> [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe & >> [1] 479 >> [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from >> /usr/local/mysql/data >> 030809 20:04:58 mysqld ended > > there is an error.log in the data directory. > Look there for mysql's complaints. > > >> HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of >> the database here, then hit return?) > > no > You are mixing up the server and client process. > mysqld is the server. It runs in the background and stores databases in > it's data directory. There can be many separate databases. > You'll select one of them later when you connect with the client. > > mysql <-- no d (=daemon) is the textmode client that comes with the > mysql package. > > >> [1]Done ./bin/mysqld_safe >> [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase >> ERROR 2002: Can't connect to local MySQL server through socket >> '/tmp/mysql.sock' (2) > > Without running server-process there is no socket to connect to. > > > start by looking at the err-file in the data-dir. > > You can run mysqld_save without the & to see more output. Sometimes the > server comes up that way. Then you wont regain access to the shell where > you ran mysqld_save. > > I had a hard time getting this kind of error. > One day I figured out, that mc caused the hick-up. mc is a textmode > filemanager I really use often. > mysqld started and died at once again. > > If mc produces this effect then perhaps other filemanaging tools do, too. > Use pure bash or xterm. > > Better yet, install mysql as a service to have it started at boot time. > > --- End Message --- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't connect to local MySQL question
I forwarded your mail to the mysql list so that everyone who cares knows what is going. Bill Hernandez wrote: The error log shows: 030810 14:52:48 mysqld started 030810 14:52:49 InnoDB: Started 030810 14:52:49 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 030810 14:52:49 Aborting Ah that sounds familiar. :( 1) If you don't know what InnoDB is, comment all the lines out that have innodb options in your /etc/my.cnf 2) InnoDB provides transactions and referential integrity. Neat things that you probaply not know about, yet. 3) I bet the file /usr/local/mysql/data/mysql/mysql.host exists but InnoDB isn't allowed to "see" it by wrong directory/file permissions of your file system (not MySQL !) I've bought several books on php/mysql and they all get right into the programming aspects Thats the point of PHP. They have to suppose you allready know to handle the DBMS. www.php.net www.devshed.net www.php.net Don't miss the PEAR extensions. --> pear.php.net Start with PHP's mysql standard functions to get a basic understanding. When you think you got that move up to the PEAR-DB classes. http://pear.php.net/manual/en/package.database.php and what I probably need to look for is a book that talks about the architecture. well, not really. Knowledge on dead trees is only good provided you have the time or motivation to actually read the book and of course some are crap anyway. Then there are those which fill 1000 pages with more or less important stuff but your specific problem is no where to be found. I hate it especially to read a chapter that stops right before the point where I need further info stating that from here it's too specific for this book. =8-O I bought lots of books which I should have read completely but just couldn't get the hang of. Buy it, take it home, put it on shelf, feel good that now all problems can come ... not quite. 1) Look in the (searchable!) online docu. Some with readers's comments. 2) Look at google. Real issues tend show up elsewhere and probaply are solved and documented allready. 3) Ask on a list. 4) Books ? Usually decorative at best though there are good ones, too. I can see that the first thing I really need to do, is get a good understanding of is all the pieces that make mysql work, what they do, how & when they get created. What tools to use, preferably GUI tools. that can't hurt ;) I like phpMyAdmin as maintenance client. mysql and mysqladmin in texmode ain't that bad either when you know what's going on. Then there is mysqlcc from mysql.com. GUI but I don't know if they build it for apples. ...and I have no clue why mysqld is unhappy about "Table 'mysql.host' doesn't exist". Where in the install, etc, process was it supposed to get created, and by which piece? /usr/local/mysql/scripts/mysql_install_db Your problem are the permissions not the lack of the file. I think I need to take three steps back, and figure out where the beginning is? Thanks for the help... no problem ... Andreas Germany -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't connect to local MySQL question
Andreas wrote: Bill Hernandez wrote: I followed the install instructions at http://entropy.ch , and was able to get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Did the server start and could you connect ? Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. 1) Have the mysql daemon running 2) connect with a client [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe & [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended there is an error.log in the data directory. Look there for mysql's complaints. HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) no You are mixing up the server and client process. mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases. You'll select one of them later when you connect with the client. mysql <-- no d (=daemon) is the textmode client that comes with the mysql package. [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Without running server-process there is no socket to connect to. start by looking at the err-file in the data-dir. You can run mysqld_save without the & to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save. I think it is mysqld_safe! I had a hard time getting this kind of error. One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often. mysqld started and died at once again. If mc produces this effect then perhaps other filemanaging tools do, too. Use pure bash or xterm. Better yet, install mysql as a service to have it started at boot time. -- Peter K. Aganyo Eternal Designs Inc., +1(617)344-8023 (fax & voicemail)
Can't connect to local MySQL question
Hi, I've been writing software on the mac since 1987, but am brand new at unix/php/mysql, and that's where I'm headed so I'm reading everything I can get my hands on, but like anything else there's going to be a learning curve, that having been said... I followed the install instructions at http://entropy.ch , and was able to get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. Could someone take a look at the syntax below and see if you could spot what I am doing wrong? Thank you very much... Bill Hernandez Last login: Sat Aug 9 20:00:07 on console Welcome to Darwin! [Home:~] justMe% su Password: [Home:/Users/justMe] justMe# cd /usr/local/mysql [Home:/usr/local/mysql] justMe# chown -R mysql data/ [Home:/usr/local/mysql] justMe# echo [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe & [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/usr/local] justMe# cd / [Home:/] justMe# /usr/local/mysql/bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/] justMe# mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [Home:/] justMe# -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Can't connect to local MySQL question
Bill Hernandez wrote: I followed the install instructions at http://entropy.ch , and was able to get mySql & php installed on my G4 -> (OSX 10.2.6) last night. I downloaded Navicat and setup a password for the mysql user. I created a connection called myDatabase_connection to a database called myDatabase. I was able to get everything running OK. Did the server start and could you connect ? Today when I restarted the machine, I tried to launch the php program that I was running last night, and kept getting an error 2002 below. 1) Have the mysql daemon running 2) connect with a client [Home:/usr/local/mysql] justMe# ./bin/mysqld_safe & [1] 479 [Home:/usr/local/mysql] justMe# Starting mysqld daemon with databases from /usr/local/mysql/data 030809 20:04:58 mysqld ended there is an error.log in the data directory. Look there for mysql's complaints. HERE I HIT RETURN TO GET THE PROMPT AGAIN (Should I have typed the name of the database here, then hit return?) no You are mixing up the server and client process. mysqld is the server. It runs in the background and stores databases in it's data directory. There can be many separate databases. You'll select one of them later when you connect with the client. mysql <-- no d (=daemon) is the textmode client that comes with the mysql package. [1]Done ./bin/mysqld_safe [Home:/usr/local/mysql] justMe# ./bin/mysql myDatabase ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Without running server-process there is no socket to connect to. start by looking at the err-file in the data-dir. You can run mysqld_save without the & to see more output. Sometimes the server comes up that way. Then you wont regain access to the shell where you ran mysqld_save. I had a hard time getting this kind of error. One day I figured out, that mc caused the hick-up. mc is a textmode filemanager I really use often. mysqld started and died at once again. If mc produces this effect then perhaps other filemanaging tools do, too. Use pure bash or xterm. Better yet, install mysql as a service to have it started at boot time. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]