• Post Reply Bookmark Topic Watch Topic
  • New Topic

MySQL Annoyance under UNIX  RSS feed

 
Anthony Andras
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I guess this could go either way, I am sorry if I put this in the wrong forum.

I have an issue (more of an annoyance) with the MySQL client. I cannot create new databases unless I am either logged in as root or use sudo to invoke the command line application. I was wondering if there are any workarounds for this. I have tried searching the internet and asking a few people. I am running Mac OS X. I figured this would be my best place to ask since OS X uses a Unix shell.

Any help would be GREATLY appreciated.

Anthony
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is there for some security reasons. You may need to grant some privileges to that normal user of yours.

You may want to take a look at this.
 
Tim Holloway
Saloon Keeper
Posts: 18795
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be worse. PostgreSQL forbids root from doing things like that. It figures that root users can already do enough damage without having the ability to run rampant over the database, so they have their own admin user ID, separate from the OS admin (root).

MySQL uses "root" as the standard master DBA account, but you don't need to su/sudo to the actual root account to use it. Just provide a "-u root" option on the MySQL client so that it will connect using the root userID.

It's common, by the way, for MySQL to come out of the box configured with root as the admin user ID and no password. This is a major security vulnerability. One of the first things you should do is provide your own root password (Note that this is the MySQL account password, which is different than the OS account password). If you don't, anyone could connect as the root user, subject to MySQL's user/host restrictions.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!