Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Accessing my database after the change
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Accessing my database after the change
Accessing my database after the change
13-03-2014 9:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi
This post may be a bit confused - I don't use cgi much but have plans for greater use. I don't understand what has happened after the recent change.
1 An example of my use prior to the change was a php file to access a database that started with:
.......
$db_host = "rumpus";
$username = "<my_user_name>";
$password = "xxxxxxxxxxxx";
$DB_name = "<my_user_name>_pn";
..........
This code still does what it it has always done, so the database is still being accessed correctly.
2 But if I open up phpMyAdmin it gives the server as sql5c51a.megsqlservers.eu and the database as <my_user_name>_pn_ccgi_plus_com.
What does this mean for any new php code I write? What do I use for db_host and DB_name?
I would be grateful for some guidance here.
Many thanks
David
This post may be a bit confused - I don't use cgi much but have plans for greater use. I don't understand what has happened after the recent change.
1 An example of my use prior to the change was a php file to access a database that started with:
.......
$db_host = "rumpus";
$username = "<my_user_name>";
$password = "xxxxxxxxxxxx";
$DB_name = "<my_user_name>_pn";
..........
This code still does what it it has always done, so the database is still being accessed correctly.
2 But if I open up phpMyAdmin it gives the server as sql5c51a.megsqlservers.eu and the database as <my_user_name>_pn_ccgi_plus_com.
What does this mean for any new php code I write? What do I use for db_host and DB_name?
I would be grateful for some guidance here.
Many thanks
David
Message 1 of 5
(1,333 Views)
4 REPLIES 4
Re: Accessing my database after the change
13-03-2014 11:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The details you have at the top of your post relates to the 'rumpus' server on the old cgi service. The old stuff is still accessible, but only until such time as everyone has been successfully migrated to the new ccgi service.
The new ccgi service uses a new server and a new MySQL database will have been created for you, so the details in your php code should be changed to:
[tt]
$db_host = "sql5c51a.megasqlservers.eu";
$username = "<ccgixxxxxxxxxxxx>";
$password = "xxxxxxxxxxxx";
$DB_name = "username_pn_ccgi_username_plus_com";
[/tt]
Your new Database User name ($username in the example above) can be found on your phpMyAdmin screen. The new Database Password ($password in the example above) should have been written into one of your website’s configuration scripts by PlusNet as part of the migration process.
The new ccgi service uses a new server and a new MySQL database will have been created for you, so the details in your php code should be changed to:
[tt]
$db_host = "sql5c51a.megasqlservers.eu";
$username = "<ccgixxxxxxxxxxxx>";
$password = "xxxxxxxxxxxx";
$DB_name = "username_pn_ccgi_username_plus_com";
[/tt]
Your new Database User name ($username in the example above) can be found on your phpMyAdmin screen. The new Database Password ($password in the example above) should have been written into one of your website’s configuration scripts by PlusNet as part of the migration process.
Message 2 of 5
(358 Views)
Re: Accessing my database after the change
13-03-2014 11:19 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
To complement what jtonline has just posted:
Your files and database tables have been migrated to new Hostopia website and MySQL servers. Although your website is on a different server its DNS entries have been changed so that the same URLs are used to access it. However this approach can't be used for migrated databases, and completely changed connection information is needed.. To avoid users having to change this information themselves the migration team have amended database settings in your files, so everything should continue to work.
If you check configuration file settings in your files what you see is the information you now need to use for accessing the new database. This is the information you need to use in any new PHP code you write. All four of the values you listed will have changed (ie including database username and password).
David
Your files and database tables have been migrated to new Hostopia website and MySQL servers. Although your website is on a different server its DNS entries have been changed so that the same URLs are used to access it. However this approach can't be used for migrated databases, and completely changed connection information is needed.. To avoid users having to change this information themselves the migration team have amended database settings in your files, so everything should continue to work.
If you check configuration file settings in your files what you see is the information you now need to use for accessing the new database. This is the information you need to use in any new PHP code you write. All four of the values you listed will have changed (ie including database username and password).
David
David
Message 3 of 5
(358 Views)
Re: Accessing my database after the change
14-03-2014 9:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Many Thanks for these replies. They've clarified the situation for me.
I'm not sure precisely where the configuration files you're refering to are, but I'll have a look around my files to find them.
David
I'm not sure precisely where the configuration files you're refering to are, but I'll have a look around my files to find them.
David
Message 4 of 5
(358 Views)
Re: Accessing my database after the change
14-03-2014 10:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Dducks 1 An example of my use prior to the change was a php file to access a database that started with:
.......
$db_host = "rumpus";
$username = "<my_user_name>";
$password = "xxxxxxxxxxxx";
$DB_name = "<my_user_name>_pn";
..........
This code still does what it it has always done, so the database is still being accessed correctly.
Without knowing what application you are using I can't be more specific, but in the example you mentioned a php file starting with those lines. If you find the same file on the new server and check its contents you should find they have been changed to those needed to access the new database. The file should be in the same relative location as on the Plusnet ccgi server but starting from your /public directory (rather than /).
You can view files on the new server using the File Manager application in Control Panel.
David
David
Message 5 of 5
(358 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Accessing my database after the change