Re: CocoaMySQL v0.7b2 Connection Help
[EMAIL PROTECTED] wrote: Responses intermixed. See below... untz [EMAIL PROTECTED] wrote on 12/02/2005 10:43:41 PM: snip 3. After logging into mysql, I created the following database: mysql create database music_development to 'untz'@'localhost' identified by 'paintball'; MySQL databases do not have the concept of ownership. They are all global. You only need to say: (@mysql CLI prompt) CREATE DATABASE music_development; and you can test to see if your create statement worked by running (@CLI) SHOW DATABASES; If your database is in that list, the command worked. You appear to have mixed a CREATE DATABASE with a GRANT statement. To create a MySQL user you need to use a GRANT statement. If you want to create a MySQL user account with all normal DB privileges (but still cannot grant permission to others), this is how I would create the account and grant access the new database: (@CLI) GRANT usage ON *.* to 'untz'@'localhost' IDENTIFIED BY 'xx'; (@CLI) GRANT ALL ON music_development to 'untz'@'localhost'; snip The db name is optional with GRANT, but the table name is not, so this statement would grant rights to the *table* named music_development in the currently selected db. (Even though I know why this is so, I've always found it a little counter-intuitive, which has led me to make the same mistake a few times.) What Shawn meant to say was GRANT ALL ON music_development.* to 'untz'@'localhost'; which grants rights on all tables in the music_development to [EMAIL PROTECTED] Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CocoaMySQL v0.7b2 Connection Help, Part II
Michael, I would still appreciate it if someone could tell me what the default port number is because I need that to set up a local JDBC connection. Kindest regards, Unnsse On Dec 2, 2005, at 11:05 PM, Michael Stassen wrote: untz wrote: Hello there! This is a continuation of a previous posting of mine... I noticed that that the CocoaMySQL v0.7b2 client lists the Database, Socket, and Port fields as optional, so I filled the other fields and when I clicked on Connect, I received this error message: Unable to connect to host localhost. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Client does not support authentication protocol requested by server; consider upgrading MySQL client Has anyone used CocoaMySQL v0.7b2 with MySQL 5 on OS X Tiger? What is the default port number? Kindest regards, Unnsse If you are connecting to the mysql server on localhost, the port is irrelevant as you are connecting via unix socket. The error message indicates that your client (CocoaMySQL v0.7b2) was compiled against the mysql 4.0 library. Authentication was changed to make it more secure in 4.1. See the manual for details and workarounds http://dev.mysql.com/doc/refman/5.0/en/old- client.html. Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CocoaMySQL v0.7b2 Connection Help, Part II
Unless you specified --skipn-etworking (which turns off TCP/IP sockets) or specifically declared a different port with --port=, the default port is 3306. http://dev.mysql.com/doc/refman/4.1/en/server-options.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine untz [EMAIL PROTECTED] wrote on 12/03/2005 05:17:37 AM: Michael, I would still appreciate it if someone could tell me what the default port number is because I need that to set up a local JDBC connection. Kindest regards, Unnsse On Dec 2, 2005, at 11:05 PM, Michael Stassen wrote: untz wrote: Hello there! This is a continuation of a previous posting of mine... I noticed that that the CocoaMySQL v0.7b2 client lists the Database, Socket, and Port fields as optional, so I filled the other fields and when I clicked on Connect, I received this error message: Unable to connect to host localhost. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Client does not support authentication protocol requested by server; consider upgrading MySQL client Has anyone used CocoaMySQL v0.7b2 with MySQL 5 on OS X Tiger? What is the default port number? Kindest regards, Unnsse If you are connecting to the mysql server on localhost, the port is irrelevant as you are connecting via unix socket. The error message indicates that your client (CocoaMySQL v0.7b2) was compiled against the mysql 4.0 library. Authentication was changed to make it more secure in 4.1. See the manual for details and workarounds http://dev.mysql.com/doc/refman/5.0/en/old- client.html. Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: CocoaMySQL v0.7b2 Connection Help
Responses intermixed. See below... untz [EMAIL PROTECTED] wrote on 12/02/2005 10:43:41 PM: Hello again, I am using OS X Tiger and MySQL 5 Community Edition with the CocoaMySQL v0.7b2 client (see: http://cocoamysql.sourceforge.net/beta.php ). Am a MySQL newbie so please pardon my questions... Here's what I did: 1. Started the MySQL server... 2. Launched mysql from the command prompt by typing in: untz $ mysql -u root -p Enter Password: ** 3. After logging into mysql, I created the following database: mysql create database music_development to 'untz'@'localhost' identified by 'paintball'; MySQL databases do not have the concept of ownership. They are all global. You only need to say: (@mysql CLI prompt) CREATE DATABASE music_development; and you can test to see if your create statement worked by running (@CLI) SHOW DATABASES; If your database is in that list, the command worked. You appear to have mixed a CREATE DATABASE with a GRANT statement. To create a MySQL user you need to use a GRANT statement. If you want to create a MySQL user account with all normal DB privileges (but still cannot grant permission to others), this is how I would create the account and grant access the new database: (@CLI) GRANT usage ON *.* to 'untz'@'localhost' IDENTIFIED BY 'xx'; (@CLI) GRANT ALL ON music_development to 'untz'@'localhost'; If the user account already exists, just run the second command. To see if there is already an account for the user 'untz' you can use this query: (@CLI) SELECT user, host from mysql.user where user='untz'; The privilege USAGE is a keyword that actually means the user can login but can't do anything or no privileges. http://dev.mysql.com/doc/refman/5.0/en/privileges.html http://dev.mysql.com/doc/refman/5.0/en/privileges-provided.html http://dev.mysql.com/doc/refman/5.0/en/grant.html 4. Ran a SQL script (which is located under 'db' directory under the root folder, 'music') which created a table named albums into this database by typing: musicmysql -u untz -p music_development db/create.sql Everything went successfully... Maybe, maybe not. Log back into the CLI and do this: (all @CLI) USE music_development; SHOW TABLE STATUS; If your script created the tables, you will see them listed. If it also populated the tables, you will see a value other than 0 for the column Rows; You do not need to drop to an OS command line to run scripts into MySQL, the MySQL CLI has the source command (abbreviated as .) that will read a script and process it as user input. http://dev.mysql.com/doc/refman/5.0/en/mysql-commands.html 5. Minimized Terminal and launched CocoaMySQL v0.7b2. 6. Put in the following information for the connection information: Host: localhost User: untz Password: paintball Database: music_development Socket: /tmp/mysql.sock Port: My question(s) are: (1) What is the default port number for a freshly created database in MySQL 5 Community Edition? Databases do not listen on ports, the server does that. (As I said in your other thread) Unless you specified otherwise, the default port is 3306. (2) Am I following all the right steps to locally connect to the music_development database using CocoaMySQL v0.7b2? I can't answer to that as I do not have a Mac to try with. (3) How do I look for port numbers associated with specific databases and change them in the MySQL monitor command prompt? Again, all databases are hosted on a single port by the server that contains them. Multiple servers on the same machine *SHOULD NOT SHARE DATABASES*!! That would most likely cause some serious synchronization problems and would probably fail horribly if you tried it. If you do have a single-machine/multi-server setup (for testing, migration, or development purposes) and you have more than one server active at the same time, then each server must have it's own connection points (TCP/IP ports and UNIX sockets) and it's own set of databases. Kindest regards! With thanks, Unnsse Shawn Green Database Administrator Unimin Corporation - Spruce Pine
Re: CocoaMySQL v0.7b2 Connection Help, Part II
ROFLMAO!!! I mean to type --skip-networking - HA ha ha!!! [EMAIL PROTECTED] wrote on 12/03/2005 09:50:19 AM: Unless you specified --skipn-etworking (which turns off TCP/IP sockets) or specifically declared a different port with --port=, the default port is 3306. http://dev.mysql.com/doc/refman/4.1/en/server-options.html Shawn Green Database Administrator Unimin Corporation - Spruce Pine untz [EMAIL PROTECTED] wrote on 12/03/2005 05:17:37 AM: Michael, I would still appreciate it if someone could tell me what the default port number is because I need that to set up a local JDBC connection. Kindest regards, Unnsse On Dec 2, 2005, at 11:05 PM, Michael Stassen wrote: untz wrote: Hello there! This is a continuation of a previous posting of mine... I noticed that that the CocoaMySQL v0.7b2 client lists the Database, Socket, and Port fields as optional, so I filled the other fields and when I clicked on Connect, I received this error message: Unable to connect to host localhost. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Client does not support authentication protocol requested by server; consider upgrading MySQL client Has anyone used CocoaMySQL v0.7b2 with MySQL 5 on OS X Tiger? What is the default port number? Kindest regards, Unnsse If you are connecting to the mysql server on localhost, the port is irrelevant as you are connecting via unix socket. The error message indicates that your client (CocoaMySQL v0.7b2) was compiled against the mysql 4.0 library. Authentication was changed to make it more secure in 4.1. See the manual for details and workarounds http://dev.mysql.com/doc/refman/5.0/en/old- client.html. Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql? [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
Re: CocoaMySQL v0.7b2 Connection Help, Part II
untz wrote: Hello there! This is a continuation of a previous posting of mine... I noticed that that the CocoaMySQL v0.7b2 client lists the Database, Socket, and Port fields as optional, so I filled the other fields and when I clicked on Connect, I received this error message: Unable to connect to host localhost. Be sure that the address is correct and that you have the necessary privileges. MySQL said: Client does not support authentication protocol requested by server; consider upgrading MySQL client Has anyone used CocoaMySQL v0.7b2 with MySQL 5 on OS X Tiger? What is the default port number? Kindest regards, Unnsse If you are connecting to the mysql server on localhost, the port is irrelevant as you are connecting via unix socket. The error message indicates that your client (CocoaMySQL v0.7b2) was compiled against the mysql 4.0 library. Authentication was changed to make it more secure in 4.1. See the manual for details and workarounds http://dev.mysql.com/doc/refman/5.0/en/old-client.html. Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]