Mysql connection

Status
Not open for further replies.

sirdyowi71

New Member
Messages
7
Reaction score
0
Points
0
how do i connect to my MySQL? what port should i call, what user name, what password???
For example:
in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
how do i connect to my MySQL? what port should i call, what user name, what password???
For example:
in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...


Read How to Create MySQL Database and User


MySQL Hostname is localhost.
 
Last edited:

er.rohittank22

New Member
Messages
4
Reaction score
0
Points
0
how do i connect to my MySQL? what port should i call, what user name, what password???
For example:
in my webpage, that contain PHP script to view the records in a table of a certain database then, what is the HostServer, Port, UserName, Password to be used for the database connection...

First create database in cpanel by Mysql Database Wizard.......
then define username password in your file eg.
<?php define('DB_HOST', 'localhost'); define('DB_USER', 'your_db_username'); define('DB_PASSWORD', 'your_password'); define('DB_DATABASE', 'your_db'); ?>
 

SierraAR

Community Advocate
Community Support
Messages
827
Reaction score
17
Points
18
You'll just need to use localhost. You can only connect from scripts running within your hosting account, however. Remote MySQL connections are not enabled on free hosting.
 
Status
Not open for further replies.
Top