• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Failure to connect to database (MySQL)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure to connect to database (MySQL)


  • Subject: Re: Failure to connect to database (MySQL)
  • From: Ron Bishop <email@hidden>
  • Date: Wed, 3 Apr 2002 16:46:24 -0600

Doing all these steps did the trick.

FYI -I had to break the first step into two parts - getting into MySQL and then running the SQL.

I had never heard of you or your product until someone mentioned it on the AppleScript ListServ of Apple's. I'm CC him and the List because people are interested.I look forward to trying it out now, especially the AppleScriptability.

Thanks again for the quick response,
Ron Bishop

On Wednesday, April 3, 2002, at 03:55 PM, email@hidden wrote:

Yup, it sounds like a known MySQL problem with JDBC clients. Try doing the following and see if that works for you:

mysql -u root -p mysql GRANT (whatever you want or ALL) PRIVILEGES ON (*.* or your_db.*) TO your_user@'%' IDENTIFIED BY 'your_passw'

for some reason, on some installations, permission must be granted specifically to databases in the user table.

There is also another known issue:

If you are connecting to the localhost, first enter an entry into your host table for localhost and your database, for example a database named 'test':

insert into host (host, db, Select_priv, Insert_priv, update_priv, Delete_priv, Create_prive, Drop_priv) values ('localhost','test', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
Next set the host of the user you are using to connect, in this case, the user is 'test' and the host is 'localhost':

update user set host = 'localhost' where user = 'test';

After making these changes, you need to either restart the server, or reload the configuration:

While in /usr/local/bin

./mysqladmin reload

You can do this with IP addresses as well as localhost. For some reason, MySQL at some point, denies access to clients, at least JDBC clients, unless you add the proper entries to these tables.

Hope that helps you connect, but let me know if it doesn't.

Michael

On Wednesday, April 3, 2002, at 11:09 AM, Ron Bishop wrote:

Here is a cut and paste from the message log:

java.sql.SQLException: Invalid authorization specification: Access denied for user: 'email@hidden' (Using password: YES)
at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:340)
at org.gjt.mm.mysql.Connection.connectionInit(Connection.java:276)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java:89)
at org.gjt.mm.mysql.Driver.connect(Driver.java:167)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at ConnectionThread.run(Unknown Source)

I have no problems connecting to the MySQL databases on this localhost machine with MacSQL Monitor, MyPHPAdmin, or MySQLadmin utility using the same information I give to SQLGrinder.

I'm running Mac OS X 10.1.3 and MySQL 3.23.41
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: list of lists as arrays - creating?
  • Next by Date: Illustrator 9/10: import formatted text & selecting PMS colours
  • Previous by thread: Re: Get UNIX path of selected file
  • Next by thread: Illustrator 9/10: import formatted text & selecting PMS colours
  • Index(es):
    • Date
    • Thread