Andy Hilton wrote:

Santino - many thanks (thanks to Brent too but I cannot reply to him
directly - seemingly I am not allowed !)

I had removed all of the mysql folder and the 'other' directory - the one
with the really long name where most stuff seemed to be....and did a
re-install...

What happens now is I have an error file which says
050722 11:51:01  mysqld started
050722 11:51:03 [Warning] Setting lower_case_table_names=2 because file
system for /usr/local/mysql/data/ is case insensitive
050722 11:51:08  InnoDB: Operating system error number 13 in a file
operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
050722 11:51:10  mysqld ended

Now this is kind of weird....All I can assume from this is that I didn't
remove some other part of the original installation and it is now upset with
permissions on the re-install - cannot see where InnoDB lives but suspect
this to be a part of the issue now - obviously until I can get MySQL to
start then I am nowhere but I do feel I am only a single step away from
getting it going again now....

Andy

Don't assume. Mysql keeps its data, including ibdata1, in the data directory. In your case, that's the default location, /usr/local/mysql/data/. The server, mysqld, runs as user mysql (by default), so the mysql user must have access to the data directory. You run the installer as root, however, so your data directory is probably owned by root, not mysql. You need to fix that. Do this:

  Open Terminal
  In Terminal, enter
    cd /usr/local/mysql/
    sudo chown -R mysql:mysql data

That will change ownership of the data directory and its contents to the mysql user, which should enable mysqld to start. You can start mysqld from the command line in terminal like this:

  cd /usr/local/mysql/
  sudo -v
  sudo bin/mysqld_safe &

or you can use the preferences pane if you installed it.

If mysqld still fails to start, post the contents of /usr/local/mysql/hostname.err ("hostname" will be your Mac's name) in your next message.

The very next thing you need to do is to secure the initial user accounts. In Terminal

  /usr/local/mysql/bin/mysqladmin -u root password "newpwd"

where newpwd is the password for the mysql root user (*not* the same thing as the unix root). Then launch the client with

  /usr/local/mysql/bin/mysql -u root -p mysql

You'll be prompted for the password you just set.  In the client,

  DELETE FROM user WHERE host='%';
  DELETE FROM user WHERE user='';
  FLUSH PRIVILEGES;
  GRANT ALL ON test.* TO [EMAIL PROTECTED] IDENTIFIED BY 'password_for_andyh';
  QUIT;

In order,
  1 prevents access from other machines.
  2 prevents access by unknown users.
  3 makes th 1 and 2 take effect.
  4 creates a mysql user for you, and gives you full access to the test
    db, but no access to the mysql (administrative) db.
  5 exits the client

The problems you've been having with the GUI are almost certainly because it has been connecting as the non-privileged anonymous user. After you make the changes above, you will have to configure it to log in as root to administer mysql, or a normal user (andyh) to work with your tables.

References:
<http://dev.mysql.com/doc/mysql/en/default-privileges.html>
<http://dev.mysql.com/doc/mysql/en/grant.html>

Michael


There's a lesson to be learned here, as well. Find and fix the real problem, don't reinstall. Reinstallation puts you back to square one.

Once you get mysqld running, you need to set up your user accounts. Do that in the mysql client, not your GUI. The problems you've been having with y



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to