|Jul 28, 2013, 03:09 PM||#1|
programming with mySQL on mac
I would please like to know how can I start coding with mySQL. I have the mac osx 10.6.8 and mySQL Workbench. I downloaded -MySQL Database 5.6.12 DMG and started mysql Server from preference. After the download, I entered in the terminal %mysql --console (command) and after, I got a message: no such job. After that, I entered %mysql -u root and I got also the same message. Usually from a book, I should be able to start coding and I would see mysql> after entering on of those 2 commands in the terminal. I spend hours trying to figure out why that doesn't work and I am still at the same place.
Thank you for your help.
|Jul 28, 2013, 05:34 PM||#2|
Try those commands in Terminal without the percent character eg
mysql --console (command) mysql -u root
Space Corps Directive 34124
Last edited by kryten2; Jul 28, 2013 at 06:24 PM.
|Jul 29, 2013, 06:25 AM||#4|
Programming with mySQL is really best plan for programming development. I think if you use PHP then this is the biggest plan. Magento CMS is the best for dynamic website and you can get templates via conversion of simple layout.
|Jul 29, 2013, 07:55 AM||#5|
Usually I'll code my work in PHP and use Sequel Pro to go ahead and handle all the Mysql Management.
Not sure what language you're looking to code it, or are you looking to code actual SQL Procedures?
Technical Architect @ C.T. Architecture
|Jul 29, 2013, 12:27 PM||#7|
Will tell you where mysql is installed. You can start it by using the full path to the command.
You might want to add aliases to your shell's resource file to make it easier to access commonly used programs such as mysql and mysqladmin from the command line. The syntax for bash is:
Even better, add /usr/local/mysql/bin to your PATH environment variable. You can do this by modifying the appropriate startup file for your shell. For more information, see Section 4.2.1, “Invoking MySQL Programs”.
|Aug 1, 2013, 01:28 PM||#9|
Thanks to you,
-I found mysql using in the /usr/local/mysql/bin folder and I tried some commands from the mysql terminal. For exemple;
mysql> SELECT VERSION(), CURRENT_DATE();
mysql> SHOW DATABASE;
and I get the right answers , but when I enter the following one, I get a mistake;
mysql> CREATE DATABASE produce;
the mistake is:
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'produce'
Can you please tell me why this is wrong? Is it because I don't use a username and a password. I still have problems making that.
-When I enter the following command, nothing special happens:
mysql -u root
and I don't get this message like I should: Welcome to the MySQL monitor. Commands end with; or g
and SELECT_VERSION(), CURRENT_DATE; won't work anymore after that command. I get the following mistake;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root
-also when I enter:
mysql> whereis mysql
why do I get this symbol and not the location?:
Thank you very much.
Last edited by snoopy531; Aug 1, 2013 at 01:41 PM.
|Aug 1, 2013, 01:56 PM||#10|
|Aug 1, 2013, 05:12 PM||#11|
I don't have or use linux and I installed mysql only for Mac os x. From the MySQL users and permissions page, I can't use shell> mysql --user=root mysql . Is that specifically a Linux command? Can we use mySQL on Mac if we don't have Linux? On Mac os x, I can't find nowhere a terminal which begins with shell>. I tried to enter mysql --user=root mysql from the /usr/local/mysql/bin mysql and I only get -> symbol without any other message.
I also tried mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
and I had this error :
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql --user=root mysql
CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass' at line 1
I need help on this please.
Thank you very much.
Last edited by snoopy531; Aug 1, 2013 at 05:17 PM.
|Aug 1, 2013, 05:54 PM||#12|
The mysql prompt looks like this:
The reason you got the > prompt after typing in 'mysql --user=root mysql' is that it's expecting you to enter a MySQL command. You can just enter a semicolon ; by itself and it will end that command and you can enter a new one.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Mac programming should be more like iOS programming.||moonman239||Mac Programming||13||Feb 17, 2014 01:37 PM|
|c programming for mac||Sriteja25||Mac Programming||3||Jul 5, 2013 03:00 AM|
|Starting up MySQL on mac on boot||estorstenson||OS X||7||Jun 7, 2013 02:38 PM|
|Programming on a Mac||ThunderBow||Mac Programming||5||Mar 13, 2013 03:25 AM|
|mac programming||SlrP||Mac Programming||6||Jan 26, 2013 12:59 PM|
All times are GMT -5. The time now is 08:01 AM.