Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mysql error message

Featured Replies

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'membersh_db'@'localhost' (using password: YES) in /home/membersh/public_html/index.php on line 9
MySQL Error: Access denied for user 'membersh_db'@'localhost' (using password: YES)

 

i get this when comnnecting, however the db user name and pass are all correct... wth :S]

 

$dbhost = "mysql.x10hosting.com"; // info to connect to database
$dbname = "membersh_db";
$dbuser = "membersh_user";
$dbpass = "password1";

 

line 9

mysql_connect($dbhost, $dbname, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error()); // connects to database

Edited by kingy da killa

Are you sure your mysql server allows remote connections? You may need to do something like add your webservers IP address to the list of allowed connections.

mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error()); // connects to database
mysql_select_db($dbname) or die ("Unable to Select Database - Check Databse name");

Edited by Samus

  • Author

Are you sure your mysql server allows remote connections? You may need to do something like add your webservers IP address to the list of allowed connections.

 

its a free host so i guess it dont alow remote connections.. bummer

There could be an option to ssh tunnel. However not likely on a free host. Best of luck!

its a free host so i guess it dont alow remote connections.. bummer

 

mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error()); // connects to database
mysql_select_db($dbname) or die ("Unable to Select Database - Check Databse name");

Try that bro^

 

The syntax for mysql_connect() is (host, username, password) in this case you did (host, databasename, username) which is wrong. So the server is reading the connection as you giving your username as a databse and you giving your password as a username. See it just wouldn't work.

Edited by Samus

Try that bro^

 

The syntax for mysql_connect() is (host, username, password) in this case you did (host, databasename, username) which is wrong. So the server is reading the connection as you giving your username as a databse and you giving your password as a username. See it just wouldn't work.

 

Totally failed to see that!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.