Use PHPMYADIMN to connect to manage multiple databases _php tutorial

Source: Internet
Author: User

Use PHPMYADIMN to connect to manage multiple databases


Use PHPMYADIMN to connect to manage multiple databases to modify the configuration file, it is very uncomfortable, and connect to the remote database, speed is not. You can use other database management tools, please refer to, Navicat combined with shortcut keys are very useful, open source, with the MySQL management tools Heidisql. If you want to use phpMyAdmin, there are two ways to connect and manage multiple MySQL servers. Method One, modify the phpmyadmin/libraries/config.default.php to modify the configuration file, it is best to back up a bit, in case you change the wrong place, not show, depressed. /** * Allow login to any user entered server in cookie based authentication * * @global boolean $cfg [' Allowarbitraryserver ']/* $cfg [' allowarbitraryserver '] = true; The default is False, change to true before the server this input box does not exist, become true after the display, you can connect a number of different databases. However, there is a drawback to this modification, if you switch between multiple databases, to quit, re-login, this is quite annoying, see the following method. Method Two, manage multiple MySQL servers at the same time. 1, rename the config.sample.inc.php under phpMyAdmin root directory to config.inc.php 2, modify the config.inc.php file/* * First server *///If you want to manage, More MySQL server, modify $connect_hosts this array on the line $connect _hosts = Array (' 1 ' =>array ("host" = "localhost",//server 1 "User" = > "root", "password" and "" "), ' 2 ' = = Array (" host "=" 192.168.0.11 ",//server 2" User "=" WordPress "," Passwo Rd "=" ******* ")); for ($i =1; $i <=count ($connect _hosts); $i + +) {/* Authentication type */$cfg [' Servers '] [$i] [' Auth_type '] = ' cookie '; /* Server Parameters */$cfg [' Servers '] [$i] [' host '] = $connect _hosts[$i] [' Host ']; Modify the host $cfg [' Servers '] [$i] [' connect_type '] = ' TCP '; $cfg [' Servers '] [$i] [' compress '] = false; /* Select mysqli If your server has it */$cfg [' Servers '] [$i] [' extension '] = ' mysql '; $cfg [' Servers '] [$i] [' allownopassword '] = true; $cfg [' Servers '] [$i] [' user '] = $connect _hosts[$i] [' User ']; Modify the user name $cfg [' Servers '] [$i] [' password '] = $connect _hosts[$i] [' Password ']; Password/* rajk-for blobstreaming */$cfg [' Servers '] [$i] [' bs_garbage_threshold '] = 50; $cfg [' Servers '] [$i] [' bs_repository_threshold '] = ' 32M '; $cfg [' Servers '] [$i] [' bs_temp_blob_timeout '] = 600; $cfg [' Servers '] [$i] [' bs_temp_log_threshold '] = ' 32M ';} Note that the array subscript does not start from 0, or it will prompt the wrong, Invalid server index: "0" before the login, phpMyAdmin modify the config.inc.php multi-server login login, phpMyAdmin connect to multiple MySQL server, after logging in a little to note, After login with localhost, select the dropdown in the 192.168.0.11, you will also let you log in, after logging in, in multiple servers This switch will not be logged in.

http://www.bkjia.com/PHPjc/1065965.html www.bkjia.com true http://www.bkjia.com/PHPjc/1065965.html techarticle use PHPMYADIMN to connect to manage multiple databases with PHPMYADIMN to connect to manage multiple databases to modify the configuration file, it is very uncomfortable, and connected to the remote database, speed is not. You can use ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.