Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[root@localhost bin]# cd /usr ; /usr/bin/safe_mysqld &
[1] 4780
[root@localhost usr]# Starting mysqld daemon with databases from /var/lib/mysql
041011 10:12:05 mysqld ended
[1]+ Done /usr/bin/safe_mysqld
Code:
[root@localhost usr]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
[root@localhost usr]# mysql_install_db
Installing all prepared tables
041011 10:13:37 /usr/libexec/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:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr ; /usr/bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; 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
Code:
[root@localhost usr]# mysqladmin -u root password mine
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
[root@localhost usr]# locate mysql.sock
[root@localhost usr]#
What does the logs say right about, "041011 10:12:05 mysqld ended"
Your not running mysql after this messgae I think. so everything after this step will fail. Get it running first and then try all the stuff you are doing above. Try running it without the & and then connect with another shell.
Yes, that abrupt ending of the server is the thing that probably needs fixing. The manual has a troubleshooting page (section 2.4.2.3) for this. It deals with, among other things, the log files and where to find them. They contain information about possible errors.
Note that mysql_install_db must be run before the MySQL server can work (and since you've done it now, it should work, I think). By the way, how did you install MySQL and from which package?
Start the MySQL server:
shell> bin/mysqld_safe --user=mysql &
...
It is important that the MySQL server be run using an unprivileged (non-root) login account. To ensure this, the --user option should be used as shown if you run mysql_safe as root. Otherwise, you should execute the script while logged in as mysql, in which case you can omit the --user option from the command. Further instructions for running MySQL as an unprivileged user are given in section A.3.2 How to Run MySQL as a Normal User.
You might have to use chown to change some file permissions. Again, the troubleshooting page has instructions.
In changed the user my startup file /etc/init.d/mysql to a local user :
ping="/usr/bin/mysqladmin -uiris ping"
I started a terminal session as root and changed the directory to where the database was installed :
/var/lib/mysql
and i run the install database
/usr/bin/mysql_install_db
There is a tool for services. I hope i translate it correctly for you.
In the menu (of your system) you will find
System Configuration
Server configuration
Services (Configure which services will be running whe the system starts)
As you start this you will find mysql unmarked.
You can mark this, do not forget to save.
And you can start mysql directly!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.