Results 1 to 1 of 1
-
20th Feb 2012, 09:38 AM #1OPMemberWebsite's:
AVANETCO.COM AVAVPS.COMInstalling MySQL from source on linux
DOWNLOAD AND COMPILE
PHP Code:cd /usr/local/src
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.25-rc.tar.gz/from/http://mysql.he.net/
tar -zxvf mysql-5.1.25-rc.tar.gz
cd mysql-5.1.25-rc
./configure --prefix=/usr --enable-assembler --with-innodb
make
make install
On ssh prompt, run
PHP Code:groupadd mysql
useradd -g mysql -d /var/lib/mysql mysql
PHP Code:touch /var/log/mysqld.log
chown mysql:mysql /var/log/mysqld.log
chown -R mysql:mysql /backup/mysql
PHP Code:cp support-files/mysql.server /etc/rc.d/init.d/mysql
chmod 755 /etc/rc.d/init.d/mysql
Before you can start mysql, you need to create my.cnf gile
PHP Code:vi /etc/my.cnf
PHP Code:[root@server52 php-5.2.6]# cat /etc/my.cnf
[mysqld]
datadir=/backup/mysql
socket=/backup/mysql/mysql.sock
[mysql.server]
user=mysql
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
socket=/backup/mysql/mysql.sock
[root@server52 php-5.2.6]#
CREATE INITIAL DATABASE
Now create the initial database with
PHP Code:./scripts/mysql_install_db
PHP Code:
[root@server52 mysql-5.1.23-ndb-6.2.15]# ./scripts/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK
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 !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h server52.hosthat.com password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/
[root@server52 mysql-5.1.23-ndb-6.2.15]#
STARTING MySQL
To start MySQL run
PHP Code:/etc/rc.d/init.d/mysql start
PHP Code:/bin/sh -x /etc/rc.d/init.d/mysql start
Also check the file /var/log/mysqld.log
STARTING MySQL ON BOOT
Run following commands to start MySQL on boot.
PHP Code:chkconfig --add mysql
chkconfig mysql on
chkconfig --list mysql
ntsysv
START/STOP MySQL
PHP Code:service mysql stop
service mysql start
PHP Code:[root@server52 ~]# /etc/init.d/mysql
Usage: /etc/init.d/mysql {start|stop|restart|reload|force-reload|status} [ MySQL server options ]
[root@server52 ~]#
AVOID MYSQL OVERWRITE BY YUM
When you install some program from yum (for example yum install exim) will install mysql also, will over write your existing MySQL installation.
To avoid happening this, edit /etc/yum.conf, add following line just below [main]
PHP Code:exclude=mysql*
PHP Code:echo "/usr/lib/mysql" >> /etc/ld.so.conf
ldconfig
ldconfig -p|grep mysql
Albert.Nawaro Reviewed by Albert.Nawaro on . Installing MySQL from source on linux DOWNLOAD AND COMPILE cd /usr/local/src wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.25-rc.tar.gz/from/http://mysql.he.net/ tar -zxvf mysql-5.1.25-rc.tar.gz cd mysql-5.1.25-rc ./configure --prefix=/usr --enable-assembler --with-innodb make Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Error mysql, when installing DLE
By bestvideorap in forum Webmaster DiscussionReplies: 5Last Post: 16th May 2011, 08:36 PM -
Help installing php with xmlrpc.mysql,apache
By lukip006 in forum Technical Help Desk SupportReplies: 8Last Post: 20th Mar 2011, 04:34 AM -
[HELP] Installing nginx PHP and MYsql!
By cyber-cliff in forum Technical Help Desk SupportReplies: 4Last Post: 16th Mar 2011, 06:24 AM -
Installing Apache, MySQL and PHP using Yum on a Linux Server
By JacksonWeb in forum Tutorials and GuidesReplies: 6Last Post: 11th Feb 2011, 06:43 AM -
Installing Apache,MySQL,PHP from scratch on Windows.
By litewarez in forum Tutorials and GuidesReplies: 7Last Post: 30th Jun 2010, 08:01 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...