Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mallorca's avatar

Can't create a mysql database when ssh'ing into vagrant

I'm new to Laravel and just joined this great community. I followed through the installation process of homestead and got my first test project to work fine.

When I ssh into homestead and do the command 'mysql -u root -p' and enter the default password (secret), I enter the MySQL monitor just fine. However when I do the command 'create database testdb' or 'show databases', it just replies with a new row to enter commands and doesn't give me any other feedback. Does someone know what the problem might be and how to solve it? Thanks!

Screenshot: http://i61.tinypic.com/15gynm1.png

0 likes
2 replies
ohffs's avatar
ohffs
Best Answer
Level 50

Are you putting a semicolon at the end of your commands? The mysql console wants something like create database xyz; .

mallorca's avatar

Silly me, being tired I missed that entirely. Works great after adding semicolon to the command, thanks!

1 like

Please or to participate in this conversation.