Jump to content

Recommended Posts

i think this has to do something with me dropping my table and trying to reinstall the blog but now i get

 

 

"can't connect to mysql5.000webhost.com"

 

so then i tried using localhost and i get...

 

"can't connect to localhost using password YES"

 

so i assume my password is right and for some reason it isnt connecting yet all the variables match up correct password, database,user i double and triple checked spelling  :wtf:

Link to comment
https://forums.phpfreaks.com/topic/219000-help-with-mysql_connect/
Share on other sites

"can't connect hostname.domain.com" isn't a standard error, you should echo the real error.

 

Your password isn't necessarily correct.  Why do you believe this host (or your local machine) have MySQL installed and running?

 

-Dan

i dropped  everything from the table.
This sentence is invalid.  You can either DROP a table, or DELETE everything from the table.  You cannot "drop" data, only tables.  What query did you run?  What button did you push?

 

If you're saying you deleted the table "users' under the database "mysql," then you've deleted your own accounts.  You cannot log in without a user table. 

 

-Dan

mine is more like this

 

define ('DB_USER', '****');
define ('DB_PASSWORD', '****');
define ('DB_HOST', '****');
define ('DB_NAME', '****');

$dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die('Could not connect to MySQL: ' . mysql_error());
mysql_select_db (DB_NAME) OR die('Could not select the database: ' . mysql_error());

 

also i recreated the table deleted it hoping it would just bring up the setup file but i still get connect errors

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.