![]() |
|
[Guide] Setup MySQL ( CentOS 6.3 ) - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Tutorials & Guides (https://lckb.dev/forum/forumdisplay.php?fid=124) +----- Forum: Ep2 Guides (https://lckb.dev/forum/forumdisplay.php?fid=165) +----- Thread: [Guide] Setup MySQL ( CentOS 6.3 ) (/showthread.php?tid=467) |
- Noizy - 11-03-2012 MySQL Installation: yum install mysql mysql-server Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server: chkconfig --levels 235 mysqld on /etc/init.d/mysqld start Set passwords for the MySQL root account: mysql_secure_installation ~[root@server1 ~]# mysql_secure_installation ~ When It Asks To Set MySQL Pass [y/N] choose N _________________________________________________________________________________________________ Installing Apache2 yum install httpd Now configure your system to start Apache at boot time... chkconfig --levels 235 httpd on ... and start Apache: /etc/init.d/httpd start Installing PHP5 We can install PHP5 and the Apache PHP5 module as follows: yum install php We must restart Apache afterwards: /etc/init.d/httpd restart _________________________________________________________________ Testing PHP5 / Getting Details About Your PHP5 Installation The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version. vi /var/www/html/info.php <?php phpinfo(); ?> _________________________________________________________________________________________________ Getting MySQL Support In PHP5 To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this: yum search php Pick the ones you need and install them like this: yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc APC can be installed as follows: yum install php-pecl-apc Now restart Apache2: /etc/init.d/httpd restart __________________________________________________________________________________________________ Installing phpMyAdmin First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 6.3 repositories: Import the RPMforge GPG key: rpm --import 2 On x86_64 systems: yum install 2 On i386 systems: yum install 2 phpMyAdmin can now be installed as follows: yum install phpmyadmin Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza): vi /etc/httpd/conf.d/phpmyadmin.conf Press: Shift + : and write: wq Next we change the authentication in phpMyAdmin from cookie to http: vi /usr/share/phpmyadmin/config.inc.php Change Like It: /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'http'; Restart Apache: /etc/init.d/httpd restart Afterwards, you can access phpMyAdmin under 2 ip/phpmyadmin/ To get Ip Adress ifconfig Credits to www.howtoforge.com - redbull - 11-03-2012 thanks - MrBeaN - 11-03-2012 Nice guide - MrSKULL - 11-03-2012 nice guide *headcrash* - XxMachaxX - 11-03-2012 Nice, thanks - atanatorr - 11-03-2012 i have problem, in phpmyadmin i only can upload db of 2mb :S and my data.sql is of 28mb - exitest - 11-03-2012 there is a possibility to add it in the upload folder in phpmyadmin/upload if that dont works you can increase the value of max_post_data & max_upload in the php.ini - atanatorr - 11-03-2012 i don't see that file - someone - 11-03-2012 Set passwords for the MySQL root account: mysql_secure_installation ~[root@server1 ~]# mysql_secure_installation ~ Set MYSQL PASS Isnn't much easyer: #mysqladmin -u [user] -p password [new password]; And to set the password for the server to connect: #mysql -u[user] -p[old password] -e "SET PASSWORD FOR [user]@localhost=OLD_PASSWORD('[new password]')"; - soryjero - 11-03-2012 nice guide. thanks a lot |