Configure MySQL 5.1 to RHEL 4


Configure MySQL 5.1 to RHEL 4

This is how i do to configure MySQL to RHEL 4 using terminal MySQL will automatically start after the successfull installation to the machine.  
  • 1. Since i can't find the my.cnf file and this message always appear [root]# /etc/init.d/mysql status /etc/init.d/mysql: line 412: test: 20424: binary operator expected MySQL is running but PID file could not be found [FAILED] , i download it from the net...here is the code: [mysqld] datadir=/var/lib/mysql skip-locking skip-innodb skip-networking safe-show-database query_cache_limit=1M query_cache_size=32M ## 32MB for every 1GB of RAM query_cache_type=1 max_user_connections=200 max_connections=500 interactive_timeout=10 wait_timeout=20 connect_timeout=20 thread_cache_size=128 key_buffer=64M ## 64MB for every 1GB of RAM join_buffer=1M max_connect_errors=20 max_allowed_packet=16M table_cache=1024 record_buffer=1M sort_buffer_size=1M ## 1MB for every 1GB of RAM read_buffer_size=1M ## 1MB for every 1GB of RAM read_rnd_buffer_size=1M ## 1MB for every 1GB of RAM thread_concurrency=2 ## Number of CPUs x 2 myisam_sort_buffer_size=64M server-id=1 [mysql.server] user=mysql #basedir=/var/lib [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/lib/mysql/mysql.pid open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [myisamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [mysqlhotcopy] interactive-timeout 
  • 2. Comment mysql file in this directory : /vat/lock/subsys/mysql because of this message : [root]# /etc/init.d/mysql status MySQL is not running, but lock exists [FAILED] 
  • 3. When i enter this command: [root ~]# /etc/init.d/mysql start I've get this message : Starting MySQLCouldn't find MySQL manager (/var/lib/bin/mysqlmanager) or server (/var/lib/bin/mysqld_safe)  
  • 4. That's why i do this part : Step 1.) Rem out the line in /etc/my.conf that was setting basedir to /var/lib. As seen below: user=mysql #basedir=/var/lib Step 2.) Create the directory "/var/run/mysqld" if it does not exist. Then chown that directory to mysql.mysql as below... mkdir /var/run/mysqld chown mysql.mysql /var/run/mysqld Step 3.) Start the service by the command /etc/init.d/mysql start and i've get this message: [root ~]# /etc/init.d/mysql start Starting MySQL [ OK ] After the configuration of MySQL i also installed the client version of MySQL by this command: [root~]# rpm --install MySQL-client-community-5.1.32-0.rhel4.i386.rpm And after the succesfull installation of the Client Version, i created a password for MySQL by this command: I typed : [root]# mysql -u root -p to set the password for MySQL. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 Server version: 5.1.32-community MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create database lportal character set utf8; The command "create database lportal character set utf8;" will be on my next post.

No comments: