Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Dec 21, 2010 12:58 pm 
Offline
Newbie

Joined: Tue Dec 21, 2010 12:45 pm
Posts: 2
Hi,

I have a pretty new CentOS install, with currently just Nginx running. I have installed MySQL a few times before on Debian and never faced any problems.

However doing a install of MySQL on CentoOS I have been having problems. Either the service wont start, or it does but I cant login with a password. If I follow the password reset guide and when trying to login I get 'cant login root@localhost'.

Im running the LATEST kernel, as I had to updgrade it to get Nginx to work.
Latest 2.6 Paravirt (2.6.32.16-linode28))

The problem I have at the moment is as follows:

[root@flex ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)

[root@flex ~]# uname -a
Linux flex 2.6.32.16-linode28 #1 SMP Sun Jul 25 21:32:42 UTC 2010 i686 i686 i386 GNU/Linux

[root@flex ~]# /etc/init.d/mysqld start
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

101221 16:49:02 mysqld started
101221 16:49:02 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
101221 16:49:02 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
101221 16:49:02 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
101221 16:49:02 mysqld ended

/tmp
drwxrwxrwt 4 root root 4096 Dec 21 16:49 tmp

/var/tmp
drwxrwxrwt 3 root root 4096 Dec 21 16:48 tmp

[root@flex ~]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I hope someone can help me as Im worried Im going to have to rebuild my VPS in case, and still I may have a problem.

If any other details are needed, let me know.


Top
   
PostPosted: Tue Dec 21, 2010 1:12 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Flex wrote:
101221 16:49:02 InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.
101221 16:49:02 mysqld ended


Make sure whatever mysql runs as has access to ./ibdata etc in the mysql data dir.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue Dec 21, 2010 1:21 pm 
Offline
Newbie

Joined: Tue Dec 21, 2010 12:45 pm
Posts: 2
Thanks for that. So I updated the conf file so 'root' is the user. Now I get:

[root@flex ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

[root@flex ~]# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@flex ~]#

101221 17:19:09 mysqld started
101221 17:19:09 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
101221 17:19:09 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
101221 17:19:09 [Warning] Ignoring user change to 'mysql' because the user was set to 'root' earlier on the command line

101221 17:19:09 InnoDB: Started; log sequence number 0 43665
101221 17:19:09 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
[root@flex ~]#


Top
   
 Post subject:
PostPosted: Wed Dec 22, 2010 4:26 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
You shouldn't run mysql as root, run it as mysql and chmod the directory so mysql has access then reset the password as normal.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group