Personal notes on Java
For other technologies like HTML, CSS, .NET, PHP, etc. check my other blog

SQL

  • inserting data in a DB;

Administration Tools:

The old MySQL Administrator (GUI Tools) tool has reached EOL and is now replaced by MySQL Workbench.
The old MySQL GUI Tools were:
MySQL Workbench provides DBAs and developers an integrated tools environment for:
  • Database Design & Modeling
  • SQL Development (replacing the old MySQL Query Browser)
  • Database Administration (replacing the old MySQL Administrator)
Download: MySQL GUI tools;
Download: The MySQL WorkBench Community (OSS) Edition is available from this page under the GPL.

MySQL Query Browser tips:

  • To execute multiple queries you need to go to: "File" -> "new Script tab"
Note: if you use NetBeans, you can use it directly to query the db instead of using the MySql Query Browser (see how bellow on this page)

MySQL System Tray Monitor

Use it to start/stop MySQL or lauch MySQL Aministrator or Query Browser

Another way of starting/stopping and checking if MySQL is running without using the system tray is:

  •  To check if MySQL is running, run the mysqladmin.exe located in the bin folder of MySQL like this:
    mysqladmin -u root -p ping
  • To start the server from the command line run the mysqld.exe  in the bin folder. For more information on this check the manual: Starting and Stopping MySQL Automatically


    Using MySQL With NetBeansIDE

    First you need to have MySQL service running on your machine. You can use the MySQL System Tray to start/stop the service. After making sure the service is running you can go to NetBeans and:
    configure the connection to MySQL by right clicking the MySQL node under the services panel:

    fill the properties:



    you can also configure NetBeans to start and stop MySQL by configuring the "Admin Properties" tab on the previous screen. Personally I've tryed it once and it gave me all sort of troubles, so I usually just leave that panel blank and use the MySQL own tool "MySQL Tray Monitor" to start/stop MySQL


    you can now connect to MySQL


    select the desired  db from the tree an connect to it


    a new db connection branch will appear (you might need to used the "refresh" option for the icon to display the correct connectivity)


    if you right-click this connection node you can start new SQL command window to query the DB


    will open the query builder:
    you can use ctrl+space to get auto-completion.

    Reference: 

    Sem comentários:

    Enviar um comentário