LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-11-2004, 12:04 AM   #1
BeatRyder
LQ Newbie
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 18

Rep: Reputation: 0
mysql fedora core 2


ok, I am a total noob, but I learn quick.

I installed mysql with fc2, and I am not sure
A)if its running
B)how I change the passwords

When I run mysql or mysqladmin i get a cannot connect to socket error

Code:
[ryder@localhost ryder]$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


any help?
 
Old 10-11-2004, 01:36 AM   #2
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Yep. It's not running. Start it and try again.
 
Old 10-11-2004, 05:06 AM   #3
wipe
Member
 
Registered: Jun 2004
Location: High Green
Distribution: Fedora Core 4
Posts: 180

Rep: Reputation: 30
Run it as root. First type su and then your system's root user password.

Searchable MySQL Manual:
http://dev.mysql.com/doc/mysql/en/index.html

Simon

Last edited by wipe; 10-11-2004 at 05:20 AM.
 
Old 10-11-2004, 12:19 PM   #4
BeatRyder
LQ Newbie
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
Here is what I have done so far:

Code:
[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]#

so I dunno what I should do now
 
Old 10-11-2004, 06:55 PM   #5
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
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.
 
Old 10-11-2004, 08:12 PM   #6
wipe
Member
 
Registered: Jun 2004
Location: High Green
Distribution: Fedora Core 4
Posts: 180

Rep: Reputation: 30
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?

Section 2.4.2 says:
Quote:
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.

Simon
 
Old 10-11-2004, 08:31 PM   #7
BeatRyder
LQ Newbie
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
I went thru mysqls trouble shooting, and thats what got me where I am right now
 
Old 10-12-2004, 02:38 PM   #8
wipe
Member
 
Registered: Jun 2004
Location: High Green
Distribution: Fedora Core 4
Posts: 180

Rep: Reputation: 30
Well, tell us what part exactly you don't understand. Check those logs and post the relevant content here.
 
Old 10-12-2004, 06:22 PM   #9
BeatRyder
LQ Newbie
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 18

Original Poster
Rep: Reputation: 0
What I dont understand is what that error msg means
 
Old 10-30-2004, 10:19 AM   #10
frank1975
LQ Newbie
 
Registered: Jul 2003
Location: netherlands
Distribution: Fedora 2
Posts: 2

Rep: Reputation: 0
I had the same problems but it is working now

I had the same problems with MYSQL.
At the moment it is running well.
Last friday i installed mysql version 3.23.58-9 with synaptic

I changed configuration file : /etc/my.cnf and now it is:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-innodb

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


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!

Good luck

Last edited by frank1975; 11-01-2004 at 12:02 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql in fedora core 2 jkmartha Linux - Software 1 05-02-2005 03:00 PM
MySQL 5.0.3 - Fedora Core 3 Ryand833 Linux - Software 2 03-30-2005 07:34 AM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 09:15 AM
MySQL in Fedora Core 2 hokagi_ninja Linux - Newbie 8 11-10-2004 09:51 PM
MySQL in Fedora Core 2 hokagi_ninja Linux - Newbie 1 10-26-2004 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration