What's sql syntax to change database name ?

I tried this: ALTER DATABASE name RENAME TO new_name

It doesn't work.

Recommended Answers

All 6 Replies

I also try:

RENAME DATABASE jsutama TO jsutama2

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATABASE jsutama TO jsutama2' at line 1

I try this:

RENAME {DATABASE} jsutama TO jsutama2

and

RENAME DATABASE jsutama TO jsutama2

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{DATABASE} jsutama TO jsutama2' at line 1

I quote: "This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23"

I don't know what sql version that I am using.

phpmyadmin 3.3.9

This is the MySQL™ Reference Manual. It documents MySQL 5.0 through 5.0.96.
(That's what's written in it's mysql reference manual)

I am trying to install a newer version of XAMPP (Xampp 1.7.4) and receive this error message:

Port 3306 is already in use! Installing MySQL Service Failed!

How to free the port? I already uninstalled the previous version of xampp.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.