MySQL Server
--
Questions
--
Followers
Top Experts
I have recently installed MySQL 4.0 on my Debian Linux box and get the following error when i run:
root@xbox:/# /usr/local/mysql/bin/mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I have looked in /tmp/ and there is no mysql.sock file. But i dont know how to create one or what to put in it etc etc.
Rik.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
shell> cd /path-to/mysql
shell> scripts/mysql_install_db
this will build the grant table for your mysql to run, try if you still got problem, post it here
I run the command; scripts/mysql_install_db and it output:
root@xbox:/usr/local/mysql
Installing all prepared tables
031218 9:42:37 ./bin/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 !
This is done with:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h xbox.oh.rik password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_
able to use the new GRANT command!
You can start the MySQL daemon with:
cd . ; ./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 ./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
root@xbox:/usr/local/mysql
Then i run the command to start it and got the following:
root@xbox:/usr/local/mysql
031218 09:44:25 mysqld ended
Any suggestions?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
For source/binary code installation have you set up the user account 'mysql' and have you give the correct user access right? below is the standard installation from mysql-standard-4.0.16-pc-l
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.
shell> ln -s full-path-to-mysql-VERSION
shell> cd mysql
shell> scripts/mysql_install_db
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
is this how you install your mysql? if no, try this.
I think i am getting closer. When i run bin/mysqld_safe --user=mysql & it just pauses. Does seem to do anything. So i run /usr/local/mysql# bin/mysqld start and the following happened.
root@xbox:/usr/local/mysql
031219 21:58:41 Can't start server: Bind on TCP/IP port: Address already in use
031219 21:58:41 Do you already have another mysqld server running on port: 3306 ?
031219 21:58:41 Aborting
031219 21:58:41 bin/mysqld: Shutdown Complete
Rik.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Hi i am getting ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
when I tried to login to mysql using
mysql -u root -p
password: mysql
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I have installled mysql on Red Hat Lunx 9
It worked for one day. After that it is not working. I have changed root password.
I found that mysql deamon is not running. When i tried to start the mysql deamon using
bin/mysqld_safe --user=mysql &
it displayed
[1] 3707
I have tried to execute
./sql-bench/run-all-tests
I got following error
Can't locate DBI.pm in
BEGIN failed--compilation aborted at ./run-all-tests line 36.
I have checked at line 36 in run-all-tests script file and it is
use DBI;
Any one please help me :(
"Suggest you try to use the 'ps -aux' to view which process running and kill all the mysql process. To kill the mysql just run "kill -9 pid" should do.
and start the mysql again to see it work or not and post the result here plz."
When i type ps -aux, I don't see any mysql process. Please let me know,
Thanks,
/usr/local/mysql/bin/mysql






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
type:
#chown -R mysql /var/lib/mysql/*
#chgrp daemon /var/lib/mysql/*
#chown -R root /var/lib/mysql/*
then start mysqld services
#etc/inet.d/mysqld start
then start mysql, it will work,
-Syed Adeeb
MySQL Server
--
Questions
--
Followers
Top Experts
MySQL is an open source, relational database management system that runs as a server providing multi-user access to a number of databases. Acquired by Oracle in 2009, it is frequently used in combination with PHP installations, powering most of the WordPress installations.