You are not logged in.

#1 2008-12-11 17:38:49

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

[SOLVED] Installing webserver. Problem with mysql.

Hi, everyone! So I am building webserver and hoping for some help from you.
I was following this tutorial
http://wiki.archlinux.org/index.php/LAMP
and everything is going fine until I get to MYSQL installation process.
I try to start it --> /etc/rc.d/mysql start
It gets BUSY and FAIL.

The thing is that Apache and PHP is working, I can place a code under /home/user/public_html and its working, but I cant get MYSQL up.

Oh, and I'm doing this as root if that helps.

Last edited by kdemon (2008-12-12 00:53:14)

Offline

#2 2008-12-11 18:04:38

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

Ok, so I checked log file mysqld.log and its empty, also checked messages.log and syslog.log - nothing.

Offline

#3 2008-12-11 19:09:03

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

seriously guys... need help

Offline

#4 2008-12-11 19:16:28

tankmcp
Member
From: Tulsa, OK
Registered: 2007-09-17
Posts: 54

Re: [SOLVED] Installing webserver. Problem with mysql.

Did you try to start with /etc/rc.d/mysql start ?
I think it should be /etc/rc.d/mysqld start
Hope this helps.

Offline

#5 2008-12-11 19:44:28

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

My mistake, yes i was starting it like this -> /etc/rc.d/mysqld start

Offline

#6 2008-12-11 19:56:33

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

I found that log file where is something about mysql is /var/lib/mysql/localhost.err
And there:

InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
mysql ended

What is that directory to which I dont have permissions? I ran the command as root, doesnt that mean, that there shoudnt be any permission errors?

Offline

#7 2008-12-11 20:16:57

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

I just entered "mysql_secure_installation" and when I am asked to input root password I get this:
"ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

Maybe it's with those permissions?

Offline

#8 2008-12-11 21:53:58

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [SOLVED] Installing webserver. Problem with mysql.

Are you sure your root? (Just checking)


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#9 2008-12-11 22:21:53

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

Yes. Well its written "root". I dont know big_smile. I'm quite new to Linux.... smile But seriously - yes - I'm root

Offline

#10 2008-12-11 22:28:33

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Installing webserver. Problem with mysql.

It might be worth checking this out. I found it googling the first line of the error you got *hint hint* big_smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#11 2008-12-11 22:56:34

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

big_smile Yes! Many thanks! It really helped, now I have mysqld running...

Last edited by kdemon (2008-12-11 23:00:12)

Offline

#12 2008-12-11 23:50:52

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

Ok, now I think I have a problem with adding root account. After running

"mysql -p -u root"

  I got

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"

As I saw Here , I had HOSTNAME="localhost" in rc.conf. I changed it to "khost". Also I added khost in /etc/hosts file -> "127.0.0.1 localhost.localdomain localhost khost". I removed mysql with pacman -Rsn switch and reinstalled it. But still no go. I can start mysqld now very nicely. But after running "mysql -p -u root" It drops me the same error as before.

Last edited by kdemon (2008-12-12 00:54:36)

Offline

#13 2008-12-12 00:44:12

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

I solved this with entering command "hostname khost". So, is there a difference between comand "hostname khost" and changing hostname in etc/rc.conf and etc/hosts files?
So I moved on. I ran mysql_install_db ---> success and finaly mysql_secure_installation with a help of this thread.
Cant say how happy I am to finaly enter root password smile

Offline

#14 2008-12-12 00:48:37

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED] Installing webserver. Problem with mysql.

Big thanks to tankmcp, haxit and finferflu for input. Hope this thread will help others. Putting as SOLVED

Offline

#15 2008-12-12 18:19:43

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Installing webserver. Problem with mysql.

Glad it helped smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

Board footer

Powered by FluxBB