ghurty Posted November 2, 2010 Share Posted November 2, 2010 What command can I use in linux to create a new mysql database. Lets assume I want to create database name: nudatabase Server is localhost, username is root, password is test. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/217594-what-command-can-i-use-in-linux-to-create-a-new-mysql-database/ Share on other sites More sharing options...
Maq Posted November 2, 2010 Share Posted November 2, 2010 You would use: mysql -uroot -p then it will prompt you for a password. To create a database, it's simply: create database database_name; Quote Link to comment https://forums.phpfreaks.com/topic/217594-what-command-can-i-use-in-linux-to-create-a-new-mysql-database/#findComment-1129647 Share on other sites More sharing options...
Maq Posted November 2, 2010 Share Posted November 2, 2010 You can 'man' almost any command to acquire detailed information: man mysql Quote Link to comment https://forums.phpfreaks.com/topic/217594-what-command-can-i-use-in-linux-to-create-a-new-mysql-database/#findComment-1129653 Share on other sites More sharing options...
roopurt18 Posted November 2, 2010 Share Posted November 2, 2010 If you want to access the database as someone other than root, don't forget to use GRANT afterwards! Quote Link to comment https://forums.phpfreaks.com/topic/217594-what-command-can-i-use-in-linux-to-create-a-new-mysql-database/#findComment-1129681 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.