Posts Tagged ‘mysql’
mySQL reset root password
Written by techieDan on May 7, 2008 – 10:48 amI’ve been using mysql for quite some time, and ever then after I shifted to a work place which uses msSQL, I felt that I’ve neglected mySQL for awhile. Basically one main question I had previously and just recently asked by my colleague is to how to change the root user password?
Here I will teach you what I usually use which is the mysql command line.
Login to mysql server using the following command prompt
$ mysqladmin -u root -p
In mysql prompt, select database mysql
mysql> use mysql;
Now update your root password by putting a new password in the NEWPASSWORD part
mysql> update user set password=PASSWORD(”NEWPASSWORD”) where User=’root’;
Finally you’ve completed the step. Oh one more final step.
mysql> flush privileges;
Now try quit the mysql command line, and relogin again using the new password. Congrats, your root has a new password ![]()
Tags: mysql
Posted in SQL | No Comments »
Dump Data mySQL Command
Written by techieDan on February 25, 2008 – 9:09 pmYou’re stuck in a new place, with no Internet connection and you have no extra additional softwares to install for GUI for mySQL updates and stuffs. Now then suddenly the client asked you to backup his database using the UNIX server. You, as a fresh database administrator suddenly felt lost and don’t know what to do.
If only everyone have learnt the basics of command line prompt, one will not have panic like the above scenario. How to backup your mysql database using command line prompt.
Windows Environment for simplicity
C:\> [MYSQL HOME]\bin\ mysqldump -u[user] -p [databasename] > something.ddl
Yes, a single line and it’s all done.
What does this line meant?
| Legend | |
| -u | user option |
| root | default username |
| -p | password option |
The rest is pretty understandable
Example if I have a username ‘root’ for the database and password ‘abc’ with the database name called db and I wanted to save all the data onto a file name data.ddl, this is what I would write below.

If you have any questions pertaining this issue, do drop a line.
Tags: DOS, mysql
Posted in SQL | No Comments »
mySQL msSQL syntax
Written by techieDan on February 13, 2008 – 12:39 ammySQL and msSQL has a similar SQL syntax but not the same. To have a grasp of what does this mean, let’s have an exercise to get 10 rows from a table with mySQL.
select * from [tablename] limit 10
Now if you were to run this sql query above on msSQL server you’ll either get a wrong sql query or query not able to compute. So alternative for msSQL is by entering this query instead.
select top 10 * from [tablename]
Simple?? Yes, that’s all there is to it. To those that need further questions answered, there are bound to be helpful people posting or me trying to help people out.
Tags: mssql, mysql, SQL
Posted in SQL | No Comments »
MySQL ownership Taken Over
Written by techieDan on January 17, 2008 – 12:33 pm
Hmm.. shocking news. It seems that the free open source MySQL database has now been bought over by SUN. Yes, Sun, the creator of Java which is famous for it’s compile once run everywhere (basically platform independent).
In terms of news, with an astonishing figure of $1,000,000,000 or in literal translation 1 Billion dollars. That’s an astonishing figure. Looks like all the big players in the Internet market are buying over stuffs.
“The combination of MySQL and Sun represents an enormous opportunity for users and organizations of all sizes seeking innovation, growth and choice,” said Marten Mickos, CEO, MySQL.
Sun’s ever many Software will integrate with MySQL. The breakdown of the $1 billion can seperate in terms of $800 million in exchange of MySQL stock and approximated $200 million in other options. With this news, now not only with the long lasting partnership of Sun Microsystems and Oracle but also with an additional new database to integrate together.
“We are going to keep investing in that and keep doing that,” he said. “It is vital to our customers. It is vital to our business, but we can also use that expertise and share that expertise to optimize MySQL technology to run on Sun systems as well as Linux and Windows systems.” says Rich Green, executive Vice President of Sun Microsystems Software.
Tags: java, mysql, News
Posted in News | No Comments »
