Showing posts with label MYSQL. Show all posts
Showing posts with label MYSQL. Show all posts

Friday, January 13, 2017

How to uinstall MySQL completely from Windows OS?

I was running some script which did some changes to my database and corrupted my root permission. Tried so many things but didn't work out.

Finally, I decided to uninstall the MySQL from my instance and install a new one but again it was not an easy job as MySQL stores file at the various locations that you have to removed manually before starting from the scratch.

Simple steps to uninstall MySQL:

  1. Stop MySQL services and remove services by executing below command in command prompt (Start it as Administrator)
    1. Net stop MySQL
    2. Sc delete MySQL
  2. Uninstall MySQL program from the control panel.
  3. #2 will uninstall the program but will not remove all the files from your machine which we have to do it manually.(Removing all files will remove existing database. Take the backup, if you need it in future.)
    1. C:\Program Files\MySQL
    2. C:\Program Files (x86)\MySQL
    3. C:\ProgramData\MySQL
    4. C:\Users\<USERNAME>\AppData\Roaming\MySQL
  4. Restart your instance and install it again.
Happy coding..!!!


Thursday, September 10, 2015

How to install and configure MySQL on Cent OS

Here are the steps to install and configure MySQL on Cent OS :
  • Install MySql Server
    • yum install mysql-server mysql php-mysql
  • Set to Chkconfig to start on boot
    • chkconfig –level 235 mysqld on
  • Start the MySQL service
    • service mysqld start
  • Set the password for all domains
    • myql -u root
    • SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new-password');
    • SET PASSWORD FOR 'root'@'localhost.localdomain' = PASSWORD('new-password');
    • SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('new-password');
  • Exit and verify the MySQL version
    • exit
    • mysql --version
      • mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1




Monday, August 24, 2015

How to add MySQL component in the Tivoli Directory Intregator (TDI).

To support MySQL database in the TDI, You first need to add mysql driver into the TDI

Here are the steps :
  • Download and copy mysql (mysql-connector-java-5.1.23-bin.jar ) jar to the location "${IBM}\TDI\V7.1\jars\3rdparty\others" where IBM is your installation directory
  • Restart TDI if it's running.
  • Click on Add component under AssemblyLines and choose JDBC connector
  • In JDBC URL,  add “jdbc:mysql://<IP>:<PORT>/<DATABASE_NAME>”.
  • in JDBC Driver, add com.mysql.jdbc.Driver
  • Provider correct Username and Password of your database.
  • Select table Name from select button.
  • Click Finish to connect to the MySQL Database.



Wednesday, September 26, 2012

MySql: Give Root User Logon Permission From Any Host

I have already updated about this in my previous blog but that was from UI, In this tutorial You can do the same task from MySQL client itself.


To configure this feature, you’ll need to update the mysql user table to allow access from any remote host, using the % wildcard.

Open the command-line mysql client on the server using the root account.
Then you will want to run the following two commands, to see what the root user host is set to already:
use mysql;
select host, user from user;
Here’s an example of the output on my database.

mysql> use mysql;
Database changed

mysql> select host,user from user;
+-----------+------+
| host      | user |
+-----------+------+
| localhost        | root |
| 127.0.0.1 | root |
| ::1       | root |
| localhost |      |
+-----------+------+
4 rows in set (0.07 sec)

Now I’ll update the localhost host to use the wildcard, and then issue the command to reload the privilege tables. If you are running this command, substitute the hostname of your box for localhost.

update user set host=’%’ where user=’root’ and host=’localhost’;
flush privileges;

Now You are able to connect to mysql from any other machine using the root account.

Tuesday, August 7, 2012

Use mySQl setup from your virtual machine

Have you ever faced a situation where you want to use your MYSQl from your virtual machine. i,e your MYSQL set up is on the windows and your linux is on VM player and you want to use it rather than installing it again on linux box.

If yes, Then here is the solution.

My System configuration where I have tested.
OS : Windows 7
MYSQL: version 5.5 on windows
RHEL 5 on VM player

Step:

1 . Open MYSQL workbench 5
2.  Open your MYSQL from server Administrator.
3.  Goto Security -> Users and Privileges
4.  Replace 'localhost' with '%' in limited connectivity to host matching box.
















And you are done here..:)

All credit goes to my Manager..Thanx a lot..:)

Tuesday, March 20, 2012

How to find MYSQl Port No and Version ?


mysql> show variables like 'port';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port          | 3306  |
+---------------+-------+
1 row in set (0.02 sec)

mysql> show variables like 'version';
+---------------+-------------------+
| Variable_name | Value             |
+---------------+-------------------+
| version       | 5.0.45-community-nt |
+---------------+-------------------+
1 row in set (0.00 sec) 

How TOPT Works: Generating OTPs Without Internet Connection

Introduction Have you ever wondered how authentication apps like RSA Authenticator generate One-Time Passwords (OTPs) without requiring an i...