The MySQL commands such as mysqldump can be found in
- /Applications/MAMP/Library/bin/
The MySQL commands such as mysqldump can be found in
Webtatic.com provides its own repository. If you want to get the latest packages such as PHP and MySQL, you can consider adding it to your yum repo by the following steps.
1. Add the yum repository information
If you want to modify the MySQL configuration in MAMP, just create the my.cnf file by the following command Continue reading
When i try to import a database, the following error is thrown and the import fails.
Export a database which is called Test:
mysqldump -u <username> -p Test > Test.sql
Sometimes we need to convert the selected data into other content type. Here is an example.
Assume we got a table with a VARCHAR column which stores number only.
mysql> SELECT * FROM demo; +----------+ | a_string | +----------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | | 7 | | 8 | | 9 | | 10 | | 11 | | 12 | | 13 | +----------+ 13 rows in set (0.00 sec)Continue reading
MAMP is Apache, MySQL and PHP runs on Mac. For Mac users, it is very convenient to use the MAMP package such that they don’t need to install the those application one by one. Moreover, MAMP package also bundled with some other useful programs as well as libraries such as phpMyAdmin and the PHP GD library. For more information, you can refer to the MAMP website.
During the installation, you can include the MAMP control panel into you Mac Dashboard. This is quite helpful for you to start and stop the server. you can also pick either PHP4 or PHP5 by switching to the back panel by clicking the i button which is located under the Apache label on the front panel.
Continue reading
I found a good article which the author shows you how to select random records from table among different kind of databases.
Here are the example for SQLite, MySQL and PostgreSQL.
Continue reading
Remember about the PHP form which inserts the entry to database after form submission? Simple PHP + MySQL form with radio button and dropdown list
Continue reading
First, create a MySQL database with the following table Continue reading