LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-19-2005, 03:23 AM   #1
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
mysql initalisation problem


Ok, I have just compiled apache (2.0.52) and php (5.03) on my Mandrake 10.1 system. I have also installed the mysql 4.1.9 binary from the mysql site. I have installed all in /usr/local and apache and php work fine, but everytime i try and start mysql I get the following error.

#Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/localhost.pid
050119 08:19:23 mysqld ended

Here is the error log,

050119 08:19:23 mysqld started
050119 8:19:23 [Warning] Ignoring user change to 'sr=mysql' because the user was set to 'mysql' earlier on the command line
/usr/local/mysql/bin/mysqld: Can't read dir of '/root/tmp/' (Errcode: 13)
/usr/local/mysql/bin/mysqld: Can't create/write to file '/root/tmp/ibt8j5Iu' (Errcode: 13)
050119 8:19:23 InnoDB: Error: unable to create temporary file; errno: 13
050119 8:19:23 [ERROR] Can't init databases
050119 8:19:23 [ERROR] Aborting

050119 8:19:23 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

050119 08:19:23 mysqld ended


now, I know the error is to do with the permissions on /root/tmp, but how can I fix this problem so that it uses /tmp instead of /root/tmp. I have searched on google and other people are having this problem but I haven't got an answer that worked for me.
 
Old 01-19-2005, 04:19 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
What does your my.cnf look like?

Cool
 
Old 01-19-2005, 06:17 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 75
Ok, just done a search on my system for that file and it doesn't seem to be there.
 
Old 01-19-2005, 06:26 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
That's not good

There should/ought to be a /etc/mysql/my.cnf OR somewhere similar (depending on what your startup script looks like) that gives a configuration to mysql. You have a few to choose from, my-huge.cnf for big memory systems, and down from there. It should be in the source directory (haven't done a source install for a while, could be wrong) where the binary lives that you untar. If not, I'm sure there are places on their site to grab it, or you can copy mine:
Code:
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!

[client]
#password       = my_password
port            = 3306
socket          = /var/run/mysqld/mysqld.sock

[safe_mysqld]
err-log         = /var/log/mysql/mysql.err

[mysqld]
skip-innodb
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
log-error       = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log          = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
#                       file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
#                      the master logs.
# mysql> SET SQL_LOG_BIN=0  - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1  - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable  = binlog-do-db=non_existant
# set-variable  = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id      = 207
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-locking
set-variable    = key_buffer=16M
set-variable    = max_allowed_packet=1M
set-variable    = thread_stack=256K
# keep secure by default!
#bind-address    = 127.0.0.1
port            = 3306
# this can make it even more secure:
#skip-networking

[mysqldump]
quick
set-variable    = max_allowed_packet=1M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
set-variable    = key_buffer=16M
Remember to run an updatedb if you didn't when searching for that file

Cool
 
Old 01-19-2005, 06:37 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 75
Ok, will look into it now and give you feedback a later.
 
Old 01-19-2005, 06:38 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
The:
tempdir =
Is the directive to pay attention to.

Good luck!

Cool
 
Old 01-19-2005, 07:20 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 75
Ok, I copied /usr/local/mysql/supportfiles/my-medium.cnf to /etc/mysql and changed the tmpdir variable to /tmp, but I still get the error. I then deleted it from /etc/mysql and put it in /usr/local/mysql/data as suggested on the notes, changed the tempdir variable to /tmp, but still the same error, it keeps wanting to write to /root/tmp. Could part of this be coz Mandrake configures users temporary directories as /userid/tmp.
 
Old 01-21-2005, 01:55 AM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
Still, it **should** be reading the config file and acting accordingly. You can use /var/lib/mysql as well for global server changes, but that may be distro specific.

At this point I really don't know what to tell you.... When trying to start the server, specify the config file to ensure it's reading it.

Cool
 
Old 01-21-2005, 04:37 AM   #9
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 75
I have searched on google for days, there are lots of people with this problem but nobody seems to have solved it. I'll just have to reluctantly use the Mandrake rpms. Thanks a lot for the help though.
 
Old 01-21-2005, 04:56 AM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
No problem, I'd probably submit a bug report if I were you, if there are tons of people with the problem and no solution turning up after an in depth google, it's the next step.

Cool
 
Old 01-21-2005, 11:55 AM   #11
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Original Poster
Rep: Reputation: 75
A bug has been submitted by other users, so hopefully the problem will be fixed soon.
 
  


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
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 01:42 AM
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
mysql 4.0.24 to mysql 4.1.12 upgrade problem tuxrules Slackware 7 08-13-2005 07:43 PM
MySQL server problem after linking (mysql.sock) ewijaya Linux - General 4 01-19-2004 10:46 AM
MySQL mysql-3.23.56-1.9, rpm install problem jacsmith510 Linux - Newbie 3 09-19-2003 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration