May 22, 2019 mysql-client is a Linux package that provides the mysql command and client libraries. On OS X, the dmg you downloaded and installed provides both the server mysqld and the client mysql, so you don't need a separate client package.
Oracle's MySQL is a popular open-source relational database management system that is based on Structured Query Language (SQL). It is frequently used in conjunction with PHP to enhance the capabilities of websites. PHP comes preloaded onto Mac computers, but MySQL does not.
When you create and test software or websites that require a MySQL database, it is handy to have MySQL installed on your computer. Installing MySQL on a Mac is easier than you might expect, particularly if you use the native installation package instead of the TAR package, which requires access and changes to the command line in Terminal mode.
Installing MySQL Using the Native Installation Package
The free download for the Mac is the MySQL Community Server edition.
The MySQL webpage contains documentation, instructions and change history for the software.
How to Start My SQL on a Mac
The MySQL server is installed on the Mac, but it does not load by default. Start MySQL by clicking Start using the MySQL Preference Pane, which was installed during the default installation. You can configure MySQL to automatically start when you turn on your computer using the MySQL Preference Pane.
Active2 years, 3 months ago
I installed mySQL for my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preference, I want to know the instruction to start from command-line.I do as follow:
After
su root
I start the mySQL server by command-line, it produce error as below:
sh-3.2# /usr/local/mysql/bin/mysqld
111028 16:57:43 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.5.17-osx10.6-x86_64/data/ is case insensitive
111028 16:57:43 [ERROR] Fatal error: Please read 'Security' section of the manual to find out how to run mysqld as root!
111028 16:57:43 [ERROR] Aborting
111028 16:57:43 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
Please help me!
EDIT:
The reason is here: http://dev.mysql.com/doc/refman/5.5/en/changing-mysql-user.html
A solution is described in the xdazz's answer below.
Anthony
28.4k2222 gold badges8585 silver badges150150 bronze badges
vietstonevietstone
4,2611313 gold badges4343 silver badges6767 bronze badges
12 Answers
Try
/usr/local/mysql/bin/mysqld_safe
Example:
![]()
You can also add these to your bash startup scripts:
Alan
5,76455 gold badges2626 silver badges3838 bronze badges
xdazzxdazz
137k2929 gold badges206206 silver badges236236 bronze badges
Simply:
mysql.server start
mysql.server stop
mysql.server restart
1,42133 gold badges1919 silver badges3434 bronze badges
user2792249user2792249
6,92533 gold badges99 silver badges33 bronze badges
I like the aliases too ... however, I've had issues with MySQLCOM for start ... it fails silently ... My workaround is akin to the others ... ~/.bash_aliases
Jordan
5,16333 gold badges1818 silver badges3030 bronze badges
Eddie BEddie B
4,10511 gold badge3232 silver badges3737 bronze badges
As this helpful article states:On OS X to start/stop MySQL from the command line:
On Linux start/stop from the command line:
Some Linux flavours offer the service command too
or
DavidDavid
If you installed it with homebrew, the binary will be somewhere like
which means you can start it with
and stop it with
Edit: As Jacob Raccuia mentioned, make sure you put the appropriate version of MySQL in the path.
Alex KAlex K
9,05533 gold badges2424 silver badges2525 bronze badges
make alias in .bash_profile
and if you are trying to run as root use following safe mode
if you are still having issues starting, a recommended read:mysql5.58 unstart server in mac os 10.6.5
Community♦
DennisDennis
3,54377 gold badges2121 silver badges4040 bronze badges
maybe your mysql-server didn't started
you can try
/usr/local/bin/mysql.server start
42wolf42wolf
If it's installed with homebrew try just typing down
mysql.server in terminal and that should be it.AFAIK it executable will be under /usr/local/bin/mysql.server.
If not you can always run following 'locate mysql.server' which will tell you where to find such file.
gitaarik
22.4k77 gold badges7474 silver badges8181 bronze badges
Mysql For Mac Os
Nevio VesićNevio Vesić
shacharsolshacharsol
If you have MySQL installed through Homebrew these commands will help you:
Mario UherMario Uher
10.2k44 gold badges3535 silver badges6565 bronze badges
Mac Manual Mysql Tutorial
My MySQL is installed via homebrew on OS X ElCaptain. What fixed it was running
brew doctor
sudo chown -R $(whoami):admin /usr/local
Then:
mysql is now running
Mac Manual Mysql File
Merhawi FissehayeMerhawi Fissehaye
Apple Mac Manual
Have you set a root password for your mysql installation? This is different to your sudo root password. Try
/usr/local/mysql/bin/mysql_secure_installation
HoppoHoppo
Mac Manual Mysql DownloadNot the answer you're looking for? Browse other questions tagged mysqlmacoscommand-lineosx-lion or ask your own question.Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |