آموزش تنظیم mysql remote در دایرکت ادمین

آموزش تنظیم mysql remote در دایرکت ادمین

1.SSH to your web server as root.

2.Edit /usr/local/directadmin/conf/mysql.conf to add in the IP of the remote mysql server as host:

user=da_admin
host=123.123.123.123
passwd=H&*(h@123

3. SSH to your remote mysql server, make sure mysql service is installed, you can test it by:

mysqld -V

 

If nothing is showing, you will need to install mysql.

mkdir mysql
cd mysql
 
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.11/MySQL-shared-5.5.11-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.11/MySQL-devel-5.5.11-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.11/MySQL-client-5.5.11-1.linux2.6.x86_64.rpm
wget http://files.directadmin.com/services/all/mysql/64-bit/5.5.11/MySQL-server-5.5.11-1.linux2.6.x86_64.rpm
 
rpm -Uvh MySQL-*

4. Login to mysql service in remote mysql server.

mysql -uroot -p

5. Grant full privileged to da_admin.

GRANT ALL PRIVILEGES ON *.* TO da_admin@132.132.132.132 IDENTIFIED BY 'H&*(h@123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit

Take note that 132.132.132.132 is the IP of you webserver, you are granting permission to let the webserver to access to your remote mysql server.

6. Test below command in the webserver to check if webserver can access to remote mysql server now.

mysql -uda_admin -p --host=123.123.123.123

7. Final test, Test it out in DirectAdmin to make sure webserver can create and manage databases via Mysql Management.

8. To allow usage of phpmyadmin so that you can manage mysql databases, please edit:

/var/www/html/phpMyAdmin/config.inc.php

Find this line:

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address

And change it to:

$cfg['Servers'][$i]['host']          = '123.123.123.123'; // MySQL hostname or IP address
  • Email, SSL
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Related Articles

آموزش نصب و کانفیگ php-fpm در دایرکت ادمین directadmin

One requirement for this instruction to work is you need PHP 5.3. I have tried to patch PHP...

آموزش نصب Spamassassin در دایرکت ادمین

1. Login to your DirectAdmin and click on “Spamassassin Setup”   2. Inside...

آموزش تنظیم mysql remote در دایرکت ادمین

The trigger of the brute_force_notice_ip.sh only happens with notices, DirectAdmin has an...

آموزش نصب ZendOpCache بر روی سرور

This url will download the latest version:http://pecl.php.net/get/ZendOpcache cd...

آموزش نصب و کانفیگ Open SSH در سرورهای لینوکسی

What is OpenSSH? OpenSSH is a free open source set of computer tools used to provide secure...