LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-11-2009, 07:59 AM   #1
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Rep: Reputation: 33
MySQL Error in slackware 12.2


When im going to run /etc/rc.d/rc.mysld it returns to me this error :

Code:
nohup: redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
090211 15:56:33  mysqld ended
Also this error it gives me and when system boots.. I want to run mysql server and use it with amarok.. thats why i want to make it work..Let me know if you have any suggestion Thanks in advance!!
 
Old 02-11-2009, 10:15 AM   #2
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Before you use mysql you have to follow Pat's instructions on how to initialise the database. They involve becoming mysql and initialising the database and setting up the root password

Quote:
su mysql
mysql_install_db
mysqladmin -u root -p ‘yourpassword’

Last edited by arubin; 02-11-2009 at 10:16 AM. Reason: spelling
 
Old 02-11-2009, 11:11 AM   #3
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
Quote:
mysqladmin -u root -p mypass
Enter password:
When i give this i enter the pass and it returns this :

Quote:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysql/mysql.sock' exists!
 
Old 02-11-2009, 11:58 AM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
You will need as root to go to /etc/rc.d

chmod +x rc.mysqld

then run rc.mysqld
 
Old 02-11-2009, 02:29 PM   #5
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
I do this but when i execute this :
./rc.mysqld it gives me back this :

Quote:
nohup: redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysql/mysql.pid
090211 22:28:38 mysqld ended
 
Old 02-11-2009, 02:45 PM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by arubin View Post
Before you use mysql you have to follow Pat's instructions on how to initialise the database. They involve becoming mysql and initialising the database and setting up the root password
The mysql initialization in Slackware 12.2 is actually a bit different than that.
Read the first part of the file /etc/rc.d/rc/mysqld which contains the information on how to set it up.
Basically, you will run:
Code:
mysql_install_db --user=mysql
to create the directories, mysql database and set ownership to the user "mysql".
If you forget to run that program with user "mysql", the files and directories will be owned by root and your MySQL server will not start. This may be what you are experiencing.

Eric
 
Old 02-11-2009, 04:48 PM   #7
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
It might then be worth looking at the folder /var/lib/mysql to see who the owner is.
 
Old 02-11-2009, 08:16 PM   #8
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
I'm having problems here as well. I only really notice it as mythttv cannot start.

I've tried some things. I verified mysql shows up in the etc/passwd file.

But, su mysql followed by whoami still shows I'm root.

I'm pretty sure I ran: mysql_install_db --user=mysql

I've also chown -R mysql:mysql /var/lib/mysql and verified ownership. Note that only RWX are only allowed by owner. Is this problem?

When sh /etc/rc.d/rc.mysqld, It does not go to prompt but hangs. Upon hitting "enter" key, it goes to prompt.

When running: mysql -u root -p, this works and I can get in.

Mythtv-setup gives me errors.

mysql log shows:
Code:
090211 20:36:40  mysqld started
090211 20:36:40 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090211 20:36:40 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090211 20:36:40 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072
090211 20:36:40  InnoDB: Started; log sequence number 0 43655
090211 20:36:40 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.67'  socket: '/var/run/mysql/mysql.sock'  port: 3306  Source distribution
Seems like its running.

Error for mythtv-setup is:
Code:
bash-3.1$ mythtv-setup
2009-02-11 21:00:10.565 Using runtime prefix = /usr, libdir = /usr/lib
2009-02-11 21:00:10.585 XScreenSaver support enabled
2009-02-11 21:00:10.585 DPMS is disabled.
2009-02-11 21:00:10.606 Empty LocalHostName.
2009-02-11 21:00:10.606 Using localhost value of xxx
2009-02-11 21:00:10.624 New DB connection, total: 1
2009-02-11 21:00:10.628 Connected to database 'mythconverg' at host: localhost
2009-02-11 21:00:10.629 Closing DB connection named 'DBManager0'
2009-02-11 21:00:10.629 Total desktop dim: 1280x1024, with 1 screen[s].
2009-02-11 21:00:10.630 Connected to database 'mythconverg' at host: localhost
2009-02-11 21:00:10.631 Using screen 0, 1280x1024 at 0,0
2009-02-11 21:00:10.646 ERROR: Unable to create schemalock table: Driver error was [2/1142]:
QMYSQL3: Unable to execute query
Database error was:
CREATE command denied to user 'mythtv'@'localhost' for table 'schemalock'

...lots more errors ending with...

2009-02-11 21:00:10.674 No current database version. Auto upgrading
2009-02-11 21:00:10.674 Newest Schema Version : 1214
2009-02-11 21:00:10.674 ERROR: Unable to create schemalock table: Driver error was [2/1142]:
QMYSQL3: Unable to execute query
Database error was:
CREATE command denied to user 'mythtv'@'localhost' for table 'schemalock'

2009-02-11 21:00:10.674 Couldn't upgrade database to new schema.
So it seems the mythtv user does not have proper access. I've also created a mythtv user. Don't know if I needed one with slackware 12.2 but it didn't help.

I thought I followed directions for giving access. I even commented out the networking option in rc.mysqld which allows network access.

So I'm at a loss. Thoughts?
 
Old 02-12-2009, 01:51 AM   #9
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Did you follow the mythtv instructions that create the database?

If you did as instructed and done

Code:
mysql -u root -p < /path/to/mc.sql
It will have created a database called "mythconverg" and the user "mythtv" (with password "mythtv") will exist with full privs on the mythconverg DB.

Be aware the the system users and the MySQL database users are completely separate.
 
Old 02-12-2009, 03:16 PM   #10
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Original Poster
Rep: Reputation: 33
Running mysql_install_db --user=mysql as root

gives me :

Quote:
Installing MySQL system tables...
090212 23:14:46 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
090212 23:14:46 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
ERROR: 1347 'mysql.db' is not BASE TABLE
090212 23:14:46 [ERROR] Aborting

090212 23:14:46 [Note] /usr/libexec/mysqld: Shutdown complete

Installation of system tables failed!

Examine the logs in /var/lib/mysql for more information.
You can try to start the mysqld daemon with:
/usr/libexec/mysqld --skip-grant &
and use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:

shell> /usr/bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
 
Old 02-12-2009, 04:21 PM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
I see:
Code:
#  mysql_install_db --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
OK
and then a lot of random bla bla. When I start the server:
Code:
# /etc/rc.d/rc.mysqld start
Starting mysqld daemon with databases from /var/lib/mysql
there is no error. And when I query the server's status:
Code:
# mysqladmin -u root status
Uptime: 27  Threads: 1  Questions: 1  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.037
It shows that the server is running.

Something must have meen mixed up during your previous attempts.

Eric
 
Old 02-12-2009, 09:36 PM   #12
forum1793
Member
 
Registered: May 2008
Posts: 312

Rep: Reputation: 34
OK,

deleted /var/lib/mysql and renewed mc.sql
This time it worked. I don't know, maybe I goofed up mc.sql.

Thanks for replies
 
  


Reply



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. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Error in installing MySQL on Slackware linux kernelvn Slackware 1 08-14-2004 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:04 AM.

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
Open Source Consulting | Domain Registration