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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-31-2003, 05:48 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Rep:
|
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 
|
|
|
08-31-2003, 06:01 PM
|
#2
|
Senior Member
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123
Rep:
|
try removing it, then connect again. that's the only thing I can think of right now
|
|
|
08-31-2003, 06:06 PM
|
#3
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
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?
|
|
|
08-31-2003, 06:19 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Posts: 15
Original Poster
Rep:
|
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?
|
|
|
09-01-2003, 12:30 AM
|
#5
|
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:
|
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'
|
|
|
09-01-2003, 12:37 AM
|
#6
|
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:
|
also make sure to run the following after setting the root password:
mysqladmin flush-privileges
|
|
|
09-01-2003, 07:41 AM
|
#7
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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 .
|
|
|
All times are GMT -5. The time now is 02:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|