Archive

Archive for the ‘Database’ Category

MySQL Workbench 5.2 – Fetching Tables Problem on Windows 7 64bit

June 12, 2012 8 comments

After updating the XAMPP and MySQL Workbench 5.2 started facing problem with MySQL Workbench 5.2 Fetching Tables Problem on Windows 7 64bit

After searching about and trying the different solutions, this works with me, which is as follows:

  1. Open the Command Prompt, by Clicking on RUN and type CMD
  2. Locate the directory where MySQL Workbench 5.2 is installed, i installed in xampp/mysql/
  3. Run the following commend mysql_upgrade -u root -p
  4. Enter the Password of your mysql database
  5. IF the command is already run before then add –force e.g  mysql_upgrade -u root -p –force
  6. Now RUN the MySQL Workbench 5.2
  7. Enter the Database username and password
  8. All the schema’s tables will be fetched

Hope this will help.

MySql Database info by Query

February 26, 2012 1 comment

If you would like to get the information about MySql database you can use the following query.

SELECT * FROM information_schema.SESSION_VARIABLES S;

OR

I need specific then I used the below query.

SELECT * FROM information_schema.SESSION_VARIABLES
WHERE VARIABLE_NAME = ‘HOSTNAME’ or VARIABLE_NAME =’VERSION’ or VARIABLE_NAME = ‘VERSION_COMPILE_OS’ or VARIABLE_NAME = ‘VERSION_COMMENT’
or VARIABLE_NAME = ‘SYSTEM_TIME_ZONE’ or VARIABLE_NAME =’DATETIME_FORMAT’ or VARIABLE_NAME = ‘BASEDIR’
or VARIABLE_NAME = ‘CHARACTER_SET_DATABASE’ or VARIABLE_NAME =’CHARACTER_SET_CONNECTION’ or VARIABLE_NAME =’GENERAL_LOG_FILE’
or VARIABLE_NAME =’LOG_ERROR’
order by variable_name desc;