LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mysql installation on Linux (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-installation-on-linux-895063/)

amartlk 08-02-2011 06:25 AM

mysql installation on Linux
 
hi

I have centos 5.3 installed and i am installing mysql binary with as follows--

1)./configure --prefix=/usr/ --sysconfdir=/etc/ --localstatedir=/var/ --with-unix-socket-path=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql

2)make

3)make install


but when i created mysql database it is created in var where i want it should be creted in var/lib/mysql


AMAr

markush 08-02-2011 06:41 AM

Hi,

why didn't you install mysql from the repository with yum?

Markus

knudfl 08-02-2011 08:04 AM

# 'yum install mysql' will also provide /etc/my.cnf :
Code:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

.. And I guess you can edit "datadir=" to any location.
..

amartlk 08-02-2011 08:34 AM

hi
i remove my.cnf from etc as if this file is present then mysql service is not start


All times are GMT -5. The time now is 05:29 PM.