LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-31-2003, 06:48 PM   #1
cosmicperl
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Rep: Reputation: 0
Unhappy MySQL error, my hair is falling out!


Hi,
I've setup MySQL, but whenever I try to run

bin/mysqld_safe --user=mysql &

as instructed in the docs I get the error:-

Cannot connect to database: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

I've tried editing the mysql.sock file with pico but it's empty.

I'm on SlackWare 9

PLEASE HELP
 
Old 08-31-2003, 07:01 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
try removing it, then connect again. that's the only thing I can think of right now
 
Old 08-31-2003, 07:06 PM   #3
cosmicperl
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
I can't get MySQL to load anymore, I keep getting this error:-

root@linuxy:/usr/local/mysql# mysqld --user=root mysql
030901 0:06:58 InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43892
InnoDB: Doing recovery: scanned up to log sequence number 0 43892
030901 0:06:58 InnoDB: Flushing modified pages from the buffer pool...
030901 0:06:58 InnoDB: Started
030901 0:06:58 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist


Also does anyone know how to have MySQL load on boot with SlackWare?
 
Old 08-31-2003, 07:19 PM   #4
cosmicperl
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
If I do

safe_mysqld --user=root

It loads, I've created a database called testdb but I cannot access it, I'm getting

Access denied for user: 'mysql@localhost' (Using password: YES)

How do I setup a username and password for the database? I'm completely lost, please help.

Is running MySQL in this way the problem?
 
Old 09-01-2003, 01:30 AM   #5
bblank
LQ Newbie
 
Registered: Aug 2003
Location: Overland Park, KS
Distribution: RedHat 9.0 (Shrike), RedHat 8.0 (Psyche), FreeBSD, OpenBSD, Solaris 7-9 SPARC
Posts: 18

Rep: Reputation: 0
To start the mysql server, try running ./safe_mysqld from the bin directory without additional parameters. If you specify the user=mysql, make sure the mysql user exists in /etc/passwd

To set up the admin user password, make sure you have the admin tools installed and run:

mysqladmin -u root password 'new password'
 
Old 09-01-2003, 01:37 AM   #6
bblank
LQ Newbie
 
Registered: Aug 2003
Location: Overland Park, KS
Distribution: RedHat 9.0 (Shrike), RedHat 8.0 (Psyche), FreeBSD, OpenBSD, Solaris 7-9 SPARC
Posts: 18

Rep: Reputation: 0
also make sure to run the following after setting the root password:

mysqladmin flush-privileges
 
Old 09-01-2003, 08:41 AM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
First, make sure that you've set up the database according to the mySQL instructions . From the second post that cosmicperl put up, it looks like that could be the problem. One of the things this procedure does is to set up the mysql table. NOTHING works without that.

Second, make sure the files in /var/lib/mysql are owned by mysql and not root. If they are owned by root, chown them so they are owned my mysql. Also check what is in /tmp. On my system, /var/mysql.sock is a link to /var/run/mysql/mysql.sock. Do a whereis mysql and see if you can locate mysql.sock.

Third, check some of the solutions from the MySQL site .

Finally, did you set a root password? The line you give (safe_mysqld --user=root) doesn't ask for one. If you DID set a root password, you need to use safe_mysqld --user=root -p, in which case it is going to be tough to start mysql at boot time. You can reset root's
password .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
yes my hair is falling out cumbakwindoz Linux - Newbie 9 02-24-2007 02:11 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
odd error on simpe script, server may be falling apart jsuarezcasana Linux - Newbie 2 06-01-2005 09:56 PM
mysql falling over - memory issues dereko Linux - General 4 04-25-2005 05:33 AM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration