You are not logged in.
Pages: 1
Followed the wiki to configure apache/php/mysql, it went fine until I reached the part of configuring mysql
[root@Faroukians /]# /etc/rc.d/mysqld start
:: Starting MySQL [DONE]
When I try to start mysql, I get the following:
[root@Faroukians /]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Offline
be sure the following line is in your /etc/hosts file.
127.0.0.1 localhost
hth,
-wd
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
Its already there, its not an apache problem, its a problem with mysql.
Offline
Offline
Its already there, its not an apache problem, its a problem with mysql.
as a FYI, mysqld is a server, it needs to know the host properly too.
Offline
Shouldn't it work specially that I followed the wiki?
Offline
Yes, it should, and if it doesn't, the wiki needs to be edited. I recall having a similar problem to yours, but I don't remember how I fixed it. It looks like the server is running, but is refusing connections. This means its refusing connections from the local machine because it feels it is unprivleged to do so. You'll need to use mysqladmin to set up the privledges or at least find out what host mysql *thinks* your local machine is. I think mysql might use localhost.localdomain by default... my /etc/hosts looks like this:
127.0.0.1 localhost.localdomain localhost
Dusty
Offline
/etc/hosts looks just like you said but I still get the error, not to mention that I can't see any mysql related process when trying ps -e after running the /etc/rc.d/mysqld script.
Offline
hmmm. Sounds as if the daemon isn't starting, rather than refusing connections.
Get some error messages... try starting mysqld dircetly maybe, or edit the /etc/rc.d/mysqld script to not redirect output to /dev/null... Or does syslog log script output, I don't remember...
Dusty
Offline
just look at /var/lib/mysql for a file called <your hostname>.err,
it's a text file with the startup sequence of mysql.
Offline
just look at /var/lib/mysql for a file called <your hostname>.err,
it's a text file with the startup sequence of mysql.
thanks alot, here's my /var/lib/mysql/localhost.err
040707 15:47:12 mysqld started
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
040707 15:47:12 Can't init databases
040707 15:47:12 Aborting
040707 15:47:12 InnoDB: Warning: shutting down a not properly started
InnoDB: or created database!
040707 15:47:12 /usr/sbin/mysqld: Shutdown Complete
040707 15:47:12 mysqld ended
Offline
maybe no database created. Did you call:?
# mysql_install_db --user=mysql
# chown -R mysql.mysql /var/lib/mysql
as root? It's in the wiki, but maybe you missed that step?
Dusty
Offline
maybe no database created. Did you call:?
# mysql_install_db --user=mysql # chown -R mysql.mysql /var/lib/mysql
as root? It's in the wiki, but maybe you missed that step?
Dusty
If you start up mysql using /etc/rc.d/mysqld, this is done for you the first time you call it as well as set up mysql user, etc....
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
done, same problem
Offline
why not remove mysql entirely (make sure you remove the files it leaves behind) then reinstall it? as i remember upon install or first run it prints clear instructions. my mysql functions just fine and i did not use the wiki.
AKA uknowme
I am not your friend
Offline
uninstalled, removed remaing files and re-installed, nothing happens on install or first running.
Offline
Ok, I saw this post and decided to give mysql a try. Upon first running /etc/rc.d/mysqld I get this message:
WARNING: The host 'zanzibar' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
But even with this message, the server starts up fine...not sure if this post helps anything...[/code]
EDIT: If you get this warning message it is beecause you need to add an entry in /etc/hosts. I just added zanzibar to the end of the entry for 127.0.0.1 and its fine.
.: lytez :.
Offline
uninstalled, removed remaing files and re-installed, nothing happens on install or first running.
To completey remove mysql, you need to do more then a pacman -R mysql, here are my suggested steps to follow if you haven't done them.
[root@frisco root]# pacman -R mysql
removing mysql...
warning: /etc/my.cnf saved as /etc/my.cnf.pacsave
warning: /etc/conf.d/mysqld saved as /etc/conf.d/mysqld.pacsave
done.
[root@frisco root]# userdel -r mysql
Then
[root@frisco root]# pacman -S mysql
Targets: mysql-4.0.20-2
Proceed with upgrade? [Y/n] y
checking package integrity... done.
loading package data... done.
checking for file conflicts... done.
installing mysql... done.
[root@frisco root]# /etc/rc.d/mysqld start
:: Adding mysql group [DONE]
:: Adding mysql user [DONE]
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
040709 12:57:16 /usr/sbin/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h frisco password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
:: Starting MySQL [DONE]
[root@frisco root]#
If your messages don't look like mine, then something else is wrong.
-wd
Hobbes : Shouldn't we read the instructions?
Calvin : Do I look like a sissy?
Offline
Had to run mysql with this command to verify the installation
mysqld --skip-grant-tables --user=mysql
Found that the command
mysql_install_db --datadir=/var/lib/mysql --user=mysql
was failing
ran it without "--user=mysql" as root and then
chown -R mysql:mysql /var/lib/mysql
that seemed to fix the problem
now the /etc/rc.d/mysqld works fine
Offline
Pages: 1