Jump to content
Sign in to follow this  
jalaladdin

Cpanel

Recommended Posts

i upload all fill in Cpanel and i create database call m_user and i create user name=m_mi,password=1234abcd but ie display this errorCould not connect: Access denied for user 'root'@'localhost' (using password: NO)

Share this post


Link to post
Share on other sites

What code are you using to connect?

Share this post


Link to post
Share on other sites
What code are you using to connect?
i'm using this code toconnect$con = mysql_connect("localhost","root","");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("m_a", $con);

Share this post


Link to post
Share on other sites

Obviously, you have to use your current database user:

mysql_connect("localhost","m_mi","1234abcd");

The server might not even be localhost. Look at your Cpanel to see what the name of the SQL server is.

Share this post


Link to post
Share on other sites
Obviously, you have to use your current database user:
mysql_connect("localhost","m_mi","1234abcd");

The server might not even be localhost. Look at your Cpanel to see what the name of the SQL server is.

i was delete user only i have database m_a

Share this post


Link to post
Share on other sites

You need to use your webhost username and password in the mysql_connect() command. Also make sure that the SQL server is correct. Check your web host for details.

mysql_connect('sql.mywebhost.com','myusername','mypassword');

Share this post


Link to post
Share on other sites

... well, obviously it isn't, since you don't seem to be able to log in correctly. What does your code look like now?

Share this post


Link to post
Share on other sites

When you set up your website on a server you used a username and a password. Place them in your code where indicated below. $con = mysql_connect("localhost","username","password");

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...