Back to website
Login
Home
Login
Back to website
There was a problem loading the comments.
How do I connect to another database on another server from my PHP script?
Support Portal
»
Knowledgebase
» Viewing Article
Print
18/05/2018 12:56 PM
Databases
MySQL
A connection is made to a database with the usual statement:
mysqli_connect('servername','username','password', 'dbname');
Where servername is the server for the database listed against this on the MySQL Database page of the hosting control panel.
Share via
Did you find this article useful?
Related Articles
How do I connect to my MySQL database from a Perl CGI script?
Why does my PHP script fail with 'Fatal error: Allowed memory size of 8388608 bytes exhausted'?
My PHP script gives the error 'Call to undefined function: mysql_connect()'
Categories
19
General
37
FAQ
11
Email Client
26
Reseller Management
36
Reseller
8
Udemy & Courses
9
Getting Started Guides
61
Email
8
Eco Web Hosting Control Panel
36
Your Account
4
Transfer/Renewal
7
Domain Control Panel
14
Hosting Control Panel
20
MySQL
21
Databases
12
Glossary
4
Registration
20
Domains
6
Admin
12
DNS
21
FTP
102
Web Hosting
11
SSH
8
SSL
10
Greenhost Configuration
13
Website Extras
16
Wordpress
41
Troubleshooting
14
Mailbox Admin
2
Windows
13
Web Builder
6
Managed WordPress
4
Python
23
PHP
9
HTML
7
CGI
2
ASP
37
Scripting
14
Webmail
25
Troubleshooting
3
MS-SQL
© Eco Web Hosting
English