How to configure phpMyAdmin connection to the old MySQL database on CORESERVER after server migration.

This content is from 2017. The steps may no longer work.

ValueDomain's CORESERVER has long been known as a shared server that, while perhaps a bit niche, allows users to experiment with many features at a low price. Now under the GMO umbrella, and with a revamped website, it seems to have a wide range of users, from long-time enthusiasts to entry-level users who only use WordPress blogs.

CORESERVER is currently undergoing a large-scale server migration. Both hardware and software are being migrated to the latest systems, which is a good thing in itself, but it is also true that the migration comes with its own set of drawbacks.

During this large-scale migration, several of the sites I manage experienced access failures due to a 500 Internal Server Error. This happened just as a deadline was fast approaching at work, which was quite inconvenient. I didn't have much time to dedicate to troubleshooting, and inquiries to the server support desk were slow to receive responses, or the replies I did get didn't resolve the issue... I realized I couldn't leave it to them any longer, so I investigated myself.

In short,

  • In this instance, several 500 errors that occurred in my system were mostly due to database access failures.
  • Speaking of databases, with this server migration,MySQL has been upgraded from version 5.1 to 5.7.It is being done
  • At the same time, the older MySQL 5.1 will also be available until around the end of March 2018.
  • To connect to the old MySQL instance, simply change the connection port from [3306] to [33051].

In other words, there are two solutions.

[A] Revise the format to connect to the new MySQL 5.7.
[B] Direct to the old MySQL 5.1 that was functioning normally before the migration.


Method [A] involves spending time thoroughly examining all database connection-related files. Method [B], while only valid until the end of March 2018 as a temporary measure, allows for immediate action against the current crisis.

So, for now, here's how to handle it using [B].

Change the DB server in the configuration file from "localhost" to "127.0.0.1:33051" and direct it to the old MySQL 5.1 that was working correctly.

...That's all you need. This should allow the site to display correctly.


But here's the problem.

The phpMyAdmin that comes standard with CORESERVER cannot view the contents of this old MySQL 5.1 database (127.0.0.1:33051).

I need to modify config.inc.php, but since phpMyAdmin has also been upgraded to version 4.6 after the migration, if I leave it as is...An error will occur.The older MySQL 5.1 requires phpMyAdmin version 4.0. It must be installed separately.


Therefore, via terminal access,

$ cd public_html/log/
$ wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.20/phpMyAdmin-4.0.10.20-all-languages.tar.gz
(...略...)

① Download phpMyAdmin 4.0.10.20 from public_html/log/.

$ tar pzxvf phpMyAdmin-4.0.10.20-all-languages.tar.gz
(...略...)

② Unzip phpMyAdmin 4.0.10.20

$ mv phpMyAdmin-4.0.10.20-all-languages phpmyadmin40

③ Rename the unzipped phpMyAdmin 4.0.10.20 file.
(Note: Here, it was renamed to "phpmyadmin40". Incidentally, the filename for phpMyAdmin 4.6, which is standard on CORESERVER, is "phpmyadmin", so you need to change it to something else.)

$ cp phpmyadmin/config.inc.php phpmyadmin40/

④ I want to keep the blowfish_secret as is,Copy "config.inc.php" from the standard phpMyAdmin 4.6 to the newly installed phpMyAdmin 4.0.

$ vi phpmyadmin40/config.inc.php

⑤ To point phpMyAdmin 4.0 to the old MySQL 5.1, modify the copied "config.inc.php" using the vi editor.

⑥ Rewrite the "/* Server parameters */" information around line 30.
Copy and paste the following.

/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '33051';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

With this,

http://{アカウントID}.{サーバ#}.coreserver.jp/log/phpmyadmin40/

This allows access to phpMyAdmin for older MySQL 5.1 databases.

Note that phpMyAdmin, which is included as standard in the new MySQL 5.7, will function as usual.

http://{アカウントID}.{サーバ#}.coreserver.jp/log/phpmyadmin/

It can be accessed via [website/platform name].

 

That's all.