Fedora Linux Support Community & Resources Center
Sections ›› Home | Forums | Guidelines | Forum Help | Fedora FAQ | Fedora News 

Go Back   FedoraForum.org > Fedora Support > Servers

Servers The place to discuss any Fedora server problems you may have.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2005-01-07, 09:46 PM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
Problem with mysql

Good day,

i've got the error msg saying :-

can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

i created the root password using :-

mysqladmin -u root password mynewpassword

it works fine, but i tried to connect my php script with the mysql database that error msg appeared at my firefox browser.

help me.
  #2  
Old 2005-01-07, 09:57 PM CST
ewdi's Avatar
ewdi Offline
Retired Admin
 
Join Date: Jan 2004
Location: Penguin Land
Age: 59
Posts: 1,939
that means mysql is not running, try run it on /etc/rc.d/init.d/mysqld
__________________
+ Visit My new blog
- [b]SlashGear US, SlashGear Japan, and
+Founder & Admin of www.fedoraforum.org

Follow me at http://twitter.com/ewdi

Laptop : MacBook Pro 2.4Ghz 4GB DDR, 20-inch iMac Aluminium/4GB RAM
  #3  
Old 2005-01-08, 02:51 AM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
i tried twice to turn it on thru command line at
/etc/rc.d/init.d/ by issuing the /etc/rc.d/init.d/mysqld start

it works fine but i still get that error msg.

i go to system settings-server-settings-services,

mysqld servies was running!

plz guide me thru.
  #4  
Old 2005-01-09, 03:56 AM CST
netblues Offline
Registered User
 
Join Date: Jan 2005
Posts: 3
First of all try connecting with comand line client
type mysql
and then show databases;
If you see some tables then mysql is up and running.
however you also have to specify mysql connection parameters in php.ini
by default in /etc/php.ini
there is a mysql section....
  #5  
Old 2005-01-09, 07:15 PM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
good day netblues,

i can access mysql databases thru cmd line very well.
there's no problem.

if there's little configuration in php.ini? [/etc/php.ini]
then how? i know there's section for mysql, but i leave it as defaults.

someone help me plz.
  #6  
Old 2005-01-10, 09:16 AM CST
zjimward's Avatar
zjimward Offline
Registered User
 
Join Date: Mar 2004
Location: Tennessee
Posts: 73
My MySql does not start at all, it fails since the update:

Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

/var/log/mysqld.log Shows:

050110 10:03:37 mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
050110 10:03:37 /usr/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050110 10:03:37 mysqld ended

Every thing was working fine until I updated to 3.23.58-14. Any one have a solution?
  #7  
Old 2005-01-10, 09:26 AM CST
brahms Offline
Registered User
 
Join Date: Aug 2004
Posts: 434
This is an SELinux issue. As root:
Code:
cd /var/lib/mysql
ls -lZ
You'll probably see that the mysql sub-directory has the wrong security context. Fix it with:
Code:
chcon -R -t mysqld_var_run_t mysql
Should start now with:
Code:
service mysqld start
__________________
  #8  
Old 2005-01-10, 01:21 PM CST
zjimward's Avatar
zjimward Offline
Registered User
 
Join Date: Mar 2004
Location: Tennessee
Posts: 73
Quote:
Originally Posted by brahms
This is an SELinux issue. As root:
Code:
cd /var/lib/mysql
ls -lZ
You'll probably see that the mysql sub-directory has the wrong security context. Fix it with:
Code:
chcon -R -t mysqld_var_run_t mysql
Should start now with:
Code:
service mysqld start
Thanks this solution worked great for me.

Why do these type of selinux issues effects me when I have it disabled?
  #9  
Old 2005-01-10, 07:39 PM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
good day,

i issued the "chcon -R -t mysqld_var_run_t mysql" as root but i the error msg saying:-

chcon: failed to change context of mysql/tables_priv.frm to root:object_r:mysqld_var_run_t: Invalid argument
chcon: failed to change context of mysql/func.MYD to root:object_r:mysqld_var_run_t: Invalid argument
and so on.

why?

i installed the fedora core 3 with SE Linux options.

what should i do now? i love tis box, and i don't want ot reinstall it again. Or maybe i try to upgrade my mysql server? Or is there any solutions? Plz.... help me.
  #10  
Old 2005-01-11, 04:11 AM CST
brahms Offline
Registered User
 
Join Date: Aug 2004
Posts: 434
Please post the output of
Code:
ls -lZ  /var/lib/mysql/
and
Code:
ls -lZ  /var/lib/mysql/mysql/
You will need to be root for this listing.
__________________
  #11  
Old 2005-01-11, 08:25 AM CST
zjimward's Avatar
zjimward Offline
Registered User
 
Join Date: Mar 2004
Location: Tennessee
Posts: 73
As a side note I also had to run:

"chcon -R -t mysqld_var_run_t"

on my database directories as well.
  #12  
Old 2005-01-11, 05:50 PM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
Good day,

Here is the dir listing

[dr_rude@kppk ~]$ su
Password:
[root@kppk dr_rude]# cd /var/lib/mysql/
[root@kppk mysql]# ls lZ
ls: lZ: No such file or directory
[root@kppk mysql]# ls -lZ
drwx------ mysql mysql user_u:object_r:var_lib_t forum
drwx------ mysql mysql root:object_r:var_lib_t mysql
srwxrwxrwx mysql mysql user_u:object_r:var_lib_t mysql.sock
drwx------ mysql mysql root:object_r:var_lib_t test
[root@kppk mysql]# chcon -R -t mysqld_var_run_t
chcon: too few arguments
Try `chcon --help' for more information.
[root@kppk mysql]#
[root@kppk mysql]# cd mysql
[root@kppk mysql]# ls -lZ
-rw-rw---- mysql mysql root:object_r:var_lib_t columns_priv.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t columns_priv.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t columns_priv.MYI
-rw-rw---- mysql mysql root:object_r:var_lib_t db.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t db.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t db.MYI
-rw-rw---- mysql mysql root:object_r:var_lib_t func.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t func.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t func.MYI
-rw-rw---- mysql mysql root:object_r:var_lib_t host.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t host.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t host.MYI
-rw-rw---- mysql mysql root:object_r:var_lib_t tables_priv.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t tables_priv.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t tables_priv.MYI
-rw-rw---- mysql mysql root:object_r:var_lib_t user.frm
-rw-rw---- mysql mysql root:object_r:var_lib_t user.MYD
-rw-rw---- mysql mysql root:object_r:var_lib_t user.MYI
[root@kppk mysql]#

Hope tis help.
  #13  
Old 2005-01-12, 03:26 AM CST
brahms Offline
Registered User
 
Join Date: Aug 2004
Posts: 434
OK. Issue this command as root:
Code:
chcon -R -t mysqld_var_run_t /var/lib/mysql/*
service mysqld restart
It will work now.

NB: chcon is the chmod for security contexts. Just like chmod, it needs to be told which file to affect. That's why you got the "too few arguments" error. Have a read of the "man chcon" pages.
__________________
  #14  
Old 2005-01-12, 05:43 PM CST
dr_rude Offline
Registered User
 
Join Date: Jan 2005
Posts: 14
good day brahms,

still no luck for me.
when i issued the "chcon -R -t mysqld_var_run_t /var/lib/mysql/*" comand,
i got the error saying "chcon: too few arguments"
  #15  
Old 2005-01-12, 06:58 PM CST
zjimward's Avatar
zjimward Offline
Registered User
 
Join Date: Mar 2004
Location: Tennessee
Posts: 73
Quote:
Originally Posted by dr_rude
good day brahms,

still no luck for me.
when i issued the "chcon -R -t mysqld_var_run_t /var/lib/mysql/*" comand,
i got the error saying "chcon: too few arguments"
I'm just wondering if you are putting a space between mysqld_var_run_t and
/var/lib/mysql/*

Only because that would cause there to many a message that says:
chcon: too few arguments

Last edited by zjimward; 2005-01-12 at 07:01 PM CST.
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql Problem thegodfaza Servers 9 2007-10-20 07:34 PM CDT
Mysql Problem (Can't start mysql) johntp Networking 5 2006-12-30 11:48 PM CST
Big problem with MYSQL Karl Larsen gmane.linux.redhat.fedora.general 4 2006-06-14 11:10 PM CDT
problem with mysql naxis gmane.linux.redhat.fedora.general 3 2005-02-08 07:20 PM CST
Mysql problem on FC1 DSLDATASOLUTIONS LTDA gmane.linux.redhat.fedora.general 1 2004-06-14 04:47 AM CDT

Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 08:34 PM CST.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
Hosting provided by ThePlanet



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2009, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Translations by vBET Translator