Click to See Complete Forum and Search --> : Mysql cannot connect through /var/lib/mysql/mysql.sock!


tgzo
08-14-2001, 04:21 PM
Hi there, I recently intalled Redhat and got apache and PHP4 running perfectly. Then i decided to install mysql rpm packages, I bought "Beginning PHP4" by Wrox book that tells me how and which mysql packages to install. It said mysql, mysql-devel, mysqlclient, and mysql-shared. On my 3 Redhat CDs, there is no mysql-shared, so I installed the other 3 instead. After I finished installing, mysql didn't give me the chance to assign a user and pass. So I tried to start mysql by typing the command "mysql", it didn't work and gave me an error saying that it cannot connect through /var/lib/mysql/mysql.sock, and something wrong with the socket. Then I tried the mysqladmin command, same result! I checked my /var/lib/mysql/ folder and found no such file and I attempted to create an empty file called mysql.sock in that directory but still no luck!

I know my question is kind of long but I really want to get apache/php4/mysql working so I can learn something. I thank you sincerely for your appreciated help!

PLBlaze
08-15-2001, 09:46 AM
For mysql to work you will need to start it first by using safe_mysqld script but before you do that mysql_install_db if i'm correct is needed to run to populate the db tables/permissions.Once that done,use safe_mysqld to fire it up (if errors the will be found in mysql's dir under 'yourhostname'.err file.Hope this helps.