Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redhat Linux install of mysql

Status
Not open for further replies.

dixondwayne

Programmer
Sep 30, 2002
5
US
Files don't want where data and etc. are... example follows.

file: my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

But the data is really in /var/lib/mysql/mysql


I see in the MYSQL documentation that mysql was suppose to install in /usr/local/mysql or /usr/local

sub-dir under the above would be
bin
data
include
lib........ and etc.


I think Redhat installed mysql whatever it wanted but start scripts are coded differently... this the case for anyone else?

Thanks,
Dwayne

 
The RPM package uses the standard RedHat directories, this is the way it "should" be. The data is stored in /var/lib/mysql/databasename, mysql is just the database that MySQL uses for authentication. //Daniel
 
So do I have to change the init type files to reflect the directories redhat is using?


file: my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

But the data is really in /var/lib/mysql/mysql



For ex., should I change my.cnf file to:

[mysqld]
datadir=/var/lib/mysql/mysql
 
as danielhozac already posted, the data for each database are stored in a separate directory in /var/lib/mysql/
/var/lib/mysql/mysql/ holds the data for the main mysql database called, what a surprise, mysql

change your my.cnf only then if the /var/lib/mysql/mysql/ contains another directory called mysql with these files:
columns_priv.frm db.frm func.frm host.frm tables_priv.frm user.frm
columns_priv.MYD db.MYD func.MYD host.MYD tables_priv.MYD user.MYD
columns_priv.MYI db.MYI func.MYI host.MYI tables_priv.MYI user.MYI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top