If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Unable to Connect to MySQL hosts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-26-11, 20:55
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
Unable to Connect to MySQL hosts

I've been working on this for two weeks now. Microsoft won't allow phone support unless I sell my kidneys for both their programs I've downloaded to assist in web development (Visual Web Developer 2010 Express and WebMatrix) After opening either program I try to install the Wordpress Application and I get to the "Enter application information:" screen and enter the correct name's and password's to the never ending error message of:

----------------------------------------------------------
The source is invalid.
Cannot connect to the database".
Cannot connect to the database".
Unable to connect to any of the specified MySQL hosts
----------------------------------------------------------

I am the administrator and I run the program as administrator on the pc. I have tried clean uninstall/reinstall. Tried opening the port 3306 for MySQL server. Nothing has worked. I really don't want to take this thing to a shop and would truly appreciate any help at all. Or at least a better forum to go to. I've tried plenty. Thank you very much.
Reply With Quote
  #2 (permalink)  
Old 07-27-11, 04:31
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
Where is MySQL database server installed? Is it on the same windows machine? The more information we get the more we will be able to help you.

Just for your information there are two ways in which a client can talk with the MySQL server, through IP sockets and through shared memory on a Windows platform. So it might be that your installation only allows local access via shared memory which will require us to configure things in a different way.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 07-27-11, 07:57
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
ok..

Thank you very much for the quick reply. Yes, it is on the same machine with the server installed in C:/ProgramData/MySQL and the Connector Net in C:/ProgramFiles/MySQL. I am trying to develop the site on my server before paying to run the site live on a host server. Someone said it may have something to do with my User Account controls but I honestly have no idea. Again, I really do appreciate your help.
Reply With Quote
  #4 (permalink)  
Old 07-27-11, 08:49
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so if the server is on the same physical machine, which makes life a wee bit easier. Ive never had the need to install MySQL in shared memory, my installations have alwasy been IP based.

so the first thing to do is to prove the server is actually alive
try to find where the MySQL monitor executable (mysql.exe) and run it from that directory

or if you are going to be creating your own data model for the site you will need some form of admin tool, personally I prefer MySQL workbench fromMySQL, but others are available such as HeidiSQL, PHPMyAdmin and so on.

install one (or more ) of those tools and then wake it up, specifying your server location (either the same IP address as your server OR as localhost)

if the tool cannot find the server then you have a bodged installation, it may also be a firewall issue although thats unlikely on the same physical machine.

if the tools connection attempt is refused then its probably a rights issue, if so retry with the system admin account and password for the server (a default installation is I think root and a null / no password).

once you have established a connection then make certain that you have GRANTed sufficient permissions for your website user to the website db. you should then make cerrtain you use the same userid, hostname and password when making your connection

my guess is that your problem is going to be a rights issue.



if you are using
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 07-27-11, 09:45
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
update

@healdem

Ok I searched for the mysql.exe in my installed drive and came up with nothing. I couldn't find it searching through the server or connector net directories either. Although, in Administrative Tools>Services the MySQL51 status is "Started" Startup Type is "automatic" and the Log On As is "Local System" I don't know if that helps at all. Thank you very much for your help.
Reply With Quote
  #6 (permalink)  
Old 07-27-11, 10:04
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so thats suggesting that there is a valid MySQL instance active

so now you need to work out what permissions have been granted to which user(s)
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #7 (permalink)  
Old 07-27-11, 10:27
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
user account

@healdem

Thank you. Ok my account is listed as Administrator under Control Panel > UserAccounts and I've also tried even opening WebMatrix and Visual Web Dev. and running as administrator and I still receive the error.
Reply With Quote
  #8 (permalink)  
Old 07-27-11, 10:49
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
have you actually tried to connect to MySQL using, say MySQL Workbench. totally outside of your development environment, so you knwo there is nothginbg screwing up the works

as said before if you've proved MySQL is running, the next thing to do is to prove that some software can connect to the server. thats why personally I recommend that you use workbench as it also provides tools on administering the server, developing SQL and modelling tools. other suggest other tools such as HeidiSQL or phpMyAdmin.


after that it comes down to making certain your development environment can talk to the server.

if you installed your version of MySQL using say XAMPP then PHPMyAdmin should also have been loaded at the same time.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old 07-27-11, 11:17
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
next

@healdem

Ok that sounds good. After downloading MySQL WB [http://wb.mysql.com/] I just run that program and it should open a connection with MySQL? I'm in the office now but will update you this evening asap [7pm US Central/12am GMT] You've been a whole lot of help.
Reply With Quote
  #10 (permalink)  
Old 07-27-11, 11:51
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
Update

OK I managed to install and run MySQL WB remotely and on the opening screen under the "Open Connection to Starting Querying" on the left it shows..

Local instance MySQL51
[user: root host: localhost3306]

Then under "Server Administration" on the right side it lists..

LocalMySQL51
[Local Type: Windows]

So it seems my software is connecting in MySQL. Or am i wrong?
Reply With Quote
  #11 (permalink)  
Old 07-27-11, 12:15
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
that shows that the MySQL server is active on the machine
it proves that that server can accept connections

so the next step is going to be working out why your applications co9nnection request is being refused

as said befo9re Im pretty certain its going to be a user permissions problems
ie the required permissions have not been GRANTed to that user
that can be anyone of the following problems
the user doesn't exist or doesn't have permissions for that DB
there are inadeqaute permissions for that user
there are no permissiuons for that user from that hostname

all of theses can be diagnosed and fixed from workbench, which is why I suggested that you load workbench.

As this is a development machine I'd suggest, to get you going, that you grant all permissions on the DB you are going to use for your website
making certain that you grant those permissions to both the localhost AND the IP address of your workstation. afterwards you may need to flush privileges
mysql workbench grant permissions - Google Search
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #12 (permalink)  
Old 07-27-11, 13:15
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
update

Ok, that makes sense. Do I need the commandprompt for this, or is can I change permissions through settings or preferences in MySQL WB? I am going to get back with you this evening when I've got more time to work through it. Thanks again, and I'll keep you posted
Reply With Quote
  #13 (permalink)  
Old 07-27-11, 13:33
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
as said in post # 11
Quote:
all of theses can be diagnosed and fixed from workbench, which is why I suggested that you load workbench.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #14 (permalink)  
Old 07-27-11, 21:12
specht15 specht15 is offline
Registered User
 
Join Date: Jul 2011
Posts: 11
Still problems

Ok I went into Manage Security on the right side of the home screen in workbench entered my server password and reached the Server Access Management (Pic 3) and Schema Privileges tabs. On the privileges tab there are grayed out Rights along the bottom (Pic 2) with the users to choose from I don't know if those have any affect. I marked the "DBA" Role at the top of the Administrative Roles Tab on the Server Access Management tab and it filled the checks below, after clicking apply it emptied the DBA box (Pic 1) closed out tried to installing WordPress app again and still receive the same exact error. I don't know if I should set a password on the Login tab or mess with the % Host settings. I appreciate any help.

1. http://img220.imageshack.us/img220/3219/dba.png
2. http://img546.imageshack.us/img546/551/schemaprivil.png
3. http://img847.imageshack.us/img847/6...raccessman.png
Reply With Quote
  #15 (permalink)  
Old 07-28-11, 04:28
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
seriously:- do not run applications with the root userID.. way to dangerous
you should create userid(s) for the the application.
you should then associate the required permissions to that user ID for that schema (database). the permissions should be the least required for that user (ie don't grant permissions that are not required for that role.
you should also define an IP Address range and or host that that user is allowed to connect from.

differnet people have different approaches but
1) I'd change the root password so that it cannot be spoofed should you loose control of your PC. take note of that password and lock it away somewhere
2) I'd create an Admin account for your normal use, this account should have all permissions for the application db, or if you prefer all permissions for all db's if you allow your DBA's access to all db's.. as a development environmnet probably all db's is a smart call. have one person per userid, and allow one person to say have multiple ID's if required say an admin account and a normal account). treat a web server as a separate user.
3) I'd create a restricted account for each db thats is being accessed from a webserver (that account should allow for the basics eg selects, updates and deletes (assuming you allow deletes)
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On