Skip to main content
Participating Frequently
March 20, 2008
Question

Quick Help Needed - Connecting to MySQL DB

  • March 20, 2008
  • 3 replies
  • 686 views
(I'm new to MySQL) - I'm trying to connect to a MySQL DB (below) - in cf admin I tried:

Database = TEST1
server = localhost
port = 8888
user = root
pass = root

error = Connection verification failed for data source: house1
java.sql.SQLException: Timed out trying to establish connection
The root cause was that: java.sql.SQLException: Timed out trying to establish connection

* I'll bet I need to create a 'normal' user tied to this DB - but I Don't know how...?

---

* GEAR: CF8 mac 10.4.10 tiger w MAMP install of php -phpMyAdmin - mysql and apache - working


I went to:

http://localhost:8888/MAMP phpMyAdmin

- and created new empty database called TEST1
- now I need to create a user - how do I do that?
- I tried to log in using using MySQL administrator APP using :

The MySQL Database can be administrated with phpMyAdmin.
To connect to the MySQL Server from your own scripts use the following connection parameters:
Host: localhost
[Port: 8889]
User: root
Password: root

but the app errored: access denied for root@localhost using password "yes" code 1045

Q: How do I create a user for this database TEST1?
Q: How do I restore in this database TEST1 from another backup (which I have)?
This topic has been closed for replies.

3 replies

Inspiring
March 20, 2008
Thanks Folks - that totally worked!

When I changed MAMP prefs to 3306 - it worked great
also - then I saw that that default MAMP sql is on 8889 not 8888 (that's for mamp app - I mistyped 8888) and 8889 works too!

I'm happy - thanks for the help!
Participating Frequently
March 20, 2008
Here is a simple tutorial for CF7.

http://howtoforge.com/coldfusion7_mysql4.1_connection

If you have CF8 there is already new MySQL drivers.

It looks like you have the port issue and you need to define the default port 3306 (if there is a default installation) and this port already comes automatically in CF8 admin when you select mySQL as DS.
Participant
March 20, 2008
The default mysql port is 3306, phpMyAdmin is on port 8888, change your DSN to use 3306. Also, you will want to download SQLyog community edition, as it is a great open source mysql database tool. This will allow you to edit/restore your database.