It is currently Sun May 19, 2013 12:53 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Zenwalk 6.2 and mysql
PostPosted: Thu Feb 04, 2010 1:19 pm 
Zenwalker
Zenwalker

Joined: Mon Feb 01, 2010 11:31 am
Posts: 3
Zenwalk 6.2 and mysql

I have apache and PHP up and running, but I seem to fail to have mysql working. Anyone managed to make mysql to work (step n1, step n2, step3 etc) on Zenwalk 6.2? The goal is a Wordpress local installation.

The situation is like this:

1. Standard Zenwalk 6.2 "Zenwalk Standard Edition" installation

2. apache, PHP and mysql installed by netpkg

3. I have made minimal changes in httpd.conf - only those needed for apache and PHP co-work. These changes seem to be O.K. since files / pages with PHP code are handled by apache with no errors.

.................

Thanks in advance!


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Mon Feb 08, 2010 1:11 pm 
Experienced Zenwalker
Experienced Zenwalker
User avatar

Joined: Sat May 05, 2007 7:48 pm
Posts: 192
I used this and everything went ok
http://support.zenwalk.org/viewtopic.php?f=9&t=111


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Sat May 14, 2011 8:11 pm 
Regular Zenwalker
Regular Zenwalker
User avatar

Joined: Fri May 13, 2011 5:17 am
Posts: 13
Hello

I'm using Zenwalk 7.0 Openbox, and I want to run Apache, php, mysql and phpmyadmin

I try following the steps found in
viewtopic.php?f=9&t=111

and an apparently changed some things since then and need help

I have done the following

from terminal
between as SU

netpkg mirror
I select this mirror http://viking.zenwalk.org/i486/zenwalk-7.0/packages

netpkg netpkg to update it

Then install the follow packages
netpkg apache2
netpkg php.. This also install phpmyadmin
netpkg mysql


I configure the files .. as SU
leafpad /etc/apache/httdp.conf
Listen 80 change
Listen 127.0.0.1:80

Was added
ServerName 127.0.0.1:80

index.php in this place, I added index.php
DirectoryIndex index.html index.php

uncomment finally
include /etc/httpd/mod_php.conf

copy the link ~phpmyadmin in /var/www/htdocs to enter from my Localhost

the next step I did was activate the services, Startup Services
I Select httpd: The Apache web server
mysqld: The MySQL database server

reboot

From the Browser, http://127.0.0.1 by far, so good "It works!"
I try http://127.0.0.1/phpmyadmin and it reveal the code in PHP

Then
from the Terminal
apachectl stop
apachectl start

I find a message that you can not start because missing library libmm.so

From netpkg gui, I installed mm package, this library was found necessary .. everything see better and now I can get into phpmyadmin, php works but I have problems with mysql.

/etc/rc.d/rc.mysqld stop

I DO NOT HAVE PERMISSION!

Now
chmod + x /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld stop
/etc/rc.d/rc.mysqld start
mysqld_safe Logging to '/ var / lib / mysql / zenwalk.err'.
110514 15:14:27 mysqld_safe Starting mysqld daemon with databases from / var / lib / mysql
110514 15:14:27 mysqld_safe mysqld from pid file / var / run / mysql / mysql.pid ended


in another terminal - SU

mysqladmin-u root password 1234
mysqladmin: connect to server at 'localhost' failed
error: 'Can not 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!


mysql.sock does not exist in the directory, I have to do? I try use all in default and nothing also.

Excuse for my English, not very good

Thanks in advance


Last edited by darkjorg on Tue May 17, 2011 6:35 pm, edited 1 time in total.

 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Tue May 17, 2011 7:54 am 
Global Moderator
Global Moderator
User avatar

Joined: Fri Nov 10, 2006 1:16 pm
Posts: 884
What is the problem with mysql? Does it not start or do you have problems using mysql together with apache through php?
Please describe more in detail what you already tried, what works and what not, ambiguous information is not helpful for troubleshooting...

_________________
Zenwalk current
Core2 Duo 2.80 GHz, 4 GB RAM, GeForce 9400GT, HD audio, 10/100/1000 NIC onBoard, 1 TB HDD, 2x DVD-Burner
Zenwalk snapshot
P4 3.0 GHz, 1 GB RAM, GeForce 7600GS, 16 bit sound, 10/100 NIC onBoard, 2x 80 GB HDD, DVD-Burner, DVD-ROM


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Tue May 17, 2011 6:22 pm 
Regular Zenwalker
Regular Zenwalker
User avatar

Joined: Fri May 13, 2011 5:17 am
Posts: 13
MySQL can't start... and I not understand why..I think so i've done everything well

as I described in the previous comment.

In this moment, if i try execute mysql from terminal, leave this menssage

root[jorg]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)


and /var/run/mysql/ is emply not have anything

My MySQL installed version is 5.1.55 from netpkg


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Wed May 18, 2011 8:35 am 
Global Moderator
Global Moderator
User avatar

Joined: Fri Nov 10, 2006 1:16 pm
Posts: 884
Please try:

Code:
touch /var/run/mysql/mysql.sock && chown mysql:mysql /var/run/mysql/mysql.sock


Then restart mysql and check the /var/lib/mysql/mysqld.log

_________________
Zenwalk current
Core2 Duo 2.80 GHz, 4 GB RAM, GeForce 9400GT, HD audio, 10/100/1000 NIC onBoard, 1 TB HDD, 2x DVD-Burner
Zenwalk snapshot
P4 3.0 GHz, 1 GB RAM, GeForce 7600GS, 16 bit sound, 10/100 NIC onBoard, 2x 80 GB HDD, DVD-Burner, DVD-ROM


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Wed May 18, 2011 5:05 pm 
Regular Zenwalker
Regular Zenwalker
User avatar

Joined: Fri May 13, 2011 5:17 am
Posts: 13
OK, I followed the instructions and..

this file. /var/lib/mysql/mysqld.log does not exist

But in this place I see zenwalk.err
the content is

110518 12:46:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
110518 12:46:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110518 12:46:16 InnoDB: Initializing buffer pool, size = 8.0M
110518 12:46:16 InnoDB: Completed initialization of buffer pool
InnoDB: Log scan progressed past the checkpoint lsn 0 37356
110518 12:46:16 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 0 44233
110518 12:46:16 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
110518 12:46:16 InnoDB: Started; log sequence number 0 44233
110518 12:46:16 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
110518 12:46:16 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended


Only for test. I running mysql_upgrade

Code:
root[jorg]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed


this directory /var/run/mysql/ is empty yet
mysql.sock does not exist


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Wed May 18, 2011 9:35 pm 
Experienced Zenwalker
Experienced Zenwalker

Joined: Fri Mar 19, 2010 3:34 am
Posts: 126
Location: Sydney, Australia
Just checking the steps you followed.
/etc/rc.d/rc.mysqld wrote:
# Before you can run MySQL, you must have a database. To install an initial
# database, do this as root:
#
# mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# will be owned by this dedicated user. This is important, or else mysql
# (which runs as user "mysql") will not be able to write to the database
# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
#
# To increase system security, consider using "mysql_secure_installation"
# as well. For more information on this tool, please read:
# man mysql_secure_installation


You didn't mention any errors from
Code:
mysql_install_db
but it looks like it didn't run properly.


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Wed May 18, 2011 9:51 pm 
Global Moderator
Global Moderator
User avatar

Joined: Fri Nov 10, 2006 1:16 pm
Posts: 884
darkjorg wrote:
this directory /var/run/mysql/ is empty yet
mysql.sock does not exist


That's why I posted that you should create it using the touch command!
It seems the mysql internal db was not initiated yet, if you installed it but still have problems try the mysql package from slackware 13.1 repo instead, that one shouldn't have that issue.

_________________
Zenwalk current
Core2 Duo 2.80 GHz, 4 GB RAM, GeForce 9400GT, HD audio, 10/100/1000 NIC onBoard, 1 TB HDD, 2x DVD-Burner
Zenwalk snapshot
P4 3.0 GHz, 1 GB RAM, GeForce 7600GS, 16 bit sound, 10/100 NIC onBoard, 2x 80 GB HDD, DVD-Burner, DVD-ROM


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Thu May 19, 2011 1:59 am 
Experienced Zenwalker
Experienced Zenwalker

Joined: Fri Mar 19, 2010 3:34 am
Posts: 126
Location: Sydney, Australia
Touch will not create the socket correctly.
The socket will be created when mysqld runs properly.

Have a look at the documentation http://dev.mysql.com/doc/refman/5.1/en/access-denied.html


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Thu May 19, 2011 9:06 am 
Global Moderator
Global Moderator
User avatar

Joined: Fri Nov 10, 2006 1:16 pm
Posts: 884
According to the slack wiki try:


- Select one of the following config files from /etc (my-huge.cnf, my-large.cnf, my-medium.cnf und my-small.cnf) and copy the one that fits your needs most to /etc/my.cnf


e.g.

Code:
cp /etc/my-medium.cnf /etc/my.cnf



- Then do this:

Code:
cd /var/lib/mysql
mysql_install_db --user=mysql
chmod 755 /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld start


- now change the root password

Code:
mysqladmin -u root password <new_password>

_________________
Zenwalk current
Core2 Duo 2.80 GHz, 4 GB RAM, GeForce 9400GT, HD audio, 10/100/1000 NIC onBoard, 1 TB HDD, 2x DVD-Burner
Zenwalk snapshot
P4 3.0 GHz, 1 GB RAM, GeForce 7600GS, 16 bit sound, 10/100 NIC onBoard, 2x 80 GB HDD, DVD-Burner, DVD-ROM


 Profile Send private message  
 
 Post subject: Re: Zenwalk 6.2 and mysql
PostPosted: Thu May 19, 2011 5:18 pm 
Regular Zenwalker
Regular Zenwalker
User avatar

Joined: Fri May 13, 2011 5:17 am
Posts: 13
Now RUNNING everything well..

Tnx to all... I tested Gslapt (I love more xnetpkg :-[ ) to install the Slackware Packages: mysql, apache, php. and this not fix the problem

but the last comment, solved all my problems
Just went back to reinstall everything with xnetpkg

then
Code:
cp /etc/my-medium.cnf /etc/my.cnf

cd /var/lib/mysql
mysql_install_db --user=mysql
chmod 755 /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld start

mysqladmin -u root password <new_password>


 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


 Who is online

Users browsing this forum: No registered users and 0 guests


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
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron