Tete omar Posted May 13, 2013 Share Posted May 13, 2013 Hi, every time i try to connect to localhost, it occurs this error: dbConnect failed; Can't connect to MySQL server on 'localhost' (10061) And here is the connection code: dbConnect("mysql", "dbname=test;host=localhost") and i wonder what (10061) is in the error above .. Link to comment
Mossy Posted May 13, 2013 Share Posted May 13, 2013 You can do what I do: local dbName = "Database name goes here" local host = "website goes here" local username = "username goes here" local password = "password goes here" local dbConnection = dbConnect( "mysql", "dbname="..dbName..";host="..host, username, password) Link to comment
Tete omar Posted May 13, 2013 Author Share Posted May 13, 2013 There is no need for websites to connect to, as far as i know i can connect to my localhost by just typing 'localhost' or what do you mean by 'website goes here'? Link to comment
Mossy Posted May 13, 2013 Share Posted May 13, 2013 There is no need for websites to connect to, as far as i know i can connect to my localhost by just typing 'localhost' or what do you mean by 'website goes here'? Well my server is hosted so I put in the website but since you're localhost I think you just have to put localhost where host is. Link to comment
Tete omar Posted May 13, 2013 Author Share Posted May 13, 2013 Thanks for your help, i've found the problem and fixed it. Link to comment
Mossy Posted May 13, 2013 Share Posted May 13, 2013 Thanks for your help, i've found the problem and fixed it. You're welcome. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now