Database Server Installation » History » Version 1
Amber Herold, 03/15/2010 03:59 PM
| 1 | 1 | Amber Herold | h1. Setup MySQL database |
|---|---|---|---|
| 2 | |||
| 3 | Refer to [[Start_with_existing_ANY_Linux_flavor_OS#2-Setup-MySQL-databases|Setup MySQL databases]] |
||
| 4 | |||
| 5 | h2. Configure MySQL |
||
| 6 | |||
| 7 | Edit the configuration file: |
||
| 8 | |||
| 9 | <pre> |
||
| 10 | $ sudo nano /etc/my.cnf |
||
| 11 | </pre> |
||
| 12 | |||
| 13 | Add or edit the following lines: |
||
| 14 | |||
| 15 | <pre> |
||
| 16 | query_cache_type = 1 |
||
| 17 | query_cache_size = 100M |
||
| 18 | query_cache_limit= 100M |
||
| 19 | </pre> |
||
| 20 | |||
| 21 | Restart MySQL |
||
| 22 | |||
| 23 | <pre> |
||
| 24 | $ sudo /sbin/service mysqld restart |
||
| 25 | </pre> |
||
| 26 | |||
| 27 | h2. Configure phpMyAdmin |
||
| 28 | |||
| 29 | Edit the phpMyAdmin config file: |
||
| 30 | |||
| 31 | <pre> |
||
| 32 | $ sudo nano /etc/phpMyAdmin/config.inc.php |
||
| 33 | </pre> |
||
| 34 | |||
| 35 | and change the following lines: |
||
| 36 | |||
| 37 | <pre> |
||
| 38 | $cfg['Servers'][$i]['AllowRoot'] = FALSE; |
||
| 39 | </pre> |
||
| 40 | |||
| 41 | Edit the phpMyAdmin apache config file: |
||
| 42 | |||
| 43 | <pre> |
||
| 44 | $ sudo nano /etc/httpd/conf.d/phpMyAdmin.conf |
||
| 45 | </pre> |
||
| 46 | |||
| 47 | and change the following lines: |
||
| 48 | |||
| 49 | <pre> |
||
| 50 | <Directory /usr/share/phpMyAdmin/> |
||
| 51 | order deny,allow |
||
| 52 | deny from all |
||
| 53 | allow from 127.0.0.1 |
||
| 54 | allow from YOUR_IP_ADDRESS |
||
| 55 | </Directory> |
||
| 56 | </pre> |