AW: MySQL 3.23.47 on MacOSX 10.1.2: Could someone help me getting started

2002-01-30 Thread Lutz, Helmuth

Paul,

Okay, then try adding the --user=mysql option to the command.

I killed the server (kill -9) and brought it back up with -Sg --user=mysql:

The result:
[localhost:/usr/local/mysql] root# /usr/local/mysql/bin/mysqld -Sg
--user=mysql
--- Here came some hints
Cannot initialize InnoDB as 'innidb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.conf
or my.ini. If you want to use InnoDB tables, add for example,
innodb_data_file_path = /mysql/data/ibdata1:20M
But to get good performance  
---end hint and this line
/usr/local/mysql/bin/mysqld: ready for connections

This looks nice I think

but then I made this mistake:
I copy and pasted 2 lines to the terminal (instead of writing them)
and had the cursor in the 3rd line. I tried to escape without success.

--- My page looks like this:
/usr/local/mysql/bin/mysqld: ready for connections
UPDATE user SET Password=PASSWORD('new-password') 
WHERE User='root' AND Host='localhost';

exit
exit;
quit;
stop;
mysqld test;
  -- here is the cursor

--- end of my page

1)How can I escape? 
2) would it have been ok if I had used following line at this point?
UPDATE user SET Password=PASSWORD('myNewPassword') WHERE User='root' AND
Host='localhost';

Thanks, Helmuth

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL 3.23.47 on MacOSX 10.1.2: Could someone help me getting started

2002-01-29 Thread Paul DuBois

At 16:25 +0100 1/29/02, Lutz, Helmuth wrote:
Paul,

thanks for answering. Because of my job I have to succeed this
correspondence from within another location and machine.

Could you please give some more explaination to a bloody guy to Unix and
the terminal like me:

1)
Kill the server (kill -9), bring it back up with -S (skip grant tables)
so that you can reset the root password:

This is Unix I understand. Should the line look like this:
[hlutz:/usr/local/mysql] hlutz% kill -9

Not quite.  You must specify a process id (PID).  Use ps and grep to find
the MySQL processes.  For example:

% ps ax | grep mysql
   251  ??  S  0:00.08 sh /usr/local/mysql/bin/safe_mysqld
   287  ??  S  0:01.65 /usr/local/mysql/libexec/mysqld

This tells me that I need to kill processes 251 and 287.  (If you only
kill mysqld, safe_mysqld will probably just start up a new one.)  So the
kill command looks like this, for the PIDs shown above:

% kill -9 251 287

You'll need to run this command either as root (who can kill anything) or
else as the login account used to run the server.


2)
How to bring it back with -S (skip grant tables) ???

Figure out where mysqld is installed (for me, that's
/usr/local/mysql/libexec/mysqld) and invoke it like this (either as
root or as the login account used to run the server):

% /usr/local/mysql/libexec/mysqld -Sg

(As someone else pointed out, the option is -Sg, not just -S.)


3)
UPDATE user SET Password=PASSWORD('new-password')
WHERE User='root' AND Host='localhost';
FLUSH PRIVILEGES;

Is this MySQL. Are this 3 lines 2 commands (because every MySQL command
ends with a ;)

Yes, two SQL statements.  Connect to the server (you don't need any
user name or password at this point) to use the mysql database:

% mysql mysql


Should the lines look like this:
[hlutz:/usr/local/mysql] hlutz% UPDATE user SET
Password=PASSWORD('new-password') WHERE User='root' AND Host='localhost';
...MySQL message comes here
[hlutz:/usr/local/mysql] hlutz% FLUSH PRIVILEGES;
...MySQL message comes here

Run those statements from mysql.

Then quit mysql and shut down the server:

% mysqladmin -p -u root shutdown
Enter password:   - enter your new password here

Then restart the server however you normally start it.


Thanks, Helmuth


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




AW: MySQL 3.23.47 on MacOSX 10.1.2: Could someone help me getting started

2002-01-29 Thread Lutz, Helmuth

Paul,
I do not know why, but it did not work. Please see yourself:
This lines I could not copy and paste because the results are on a not
connected Mac and this is a windows machine. So I had to write it by hand
(- but looked 2 times at the text)

Your example:
% ps ax | grep mysql
   251  ??  S  0:00.08 sh /usr/local/mysql/bin/safe_mysqld
   287  ??  S  0:01.65 /usr/local/mysql/libexec/mysqld

Figure out where mysqld is installed (for me, that's
/usr/local/mysql/libexec/mysqld) and invoke it like this (either as
root or as the login account used to run the server):

% /usr/local/mysql/libexec/mysqld -Sg

--- mysqld is listed in /usr/local/mysql/bin.

My results:
---
[localhost:/usr/local/mysql] hlutz% ps ax | grep mysql
   255  ??  S  0:00.17 sh ./bin/safe_mysqld
   298  ??  S  0:01.09 /usr/local/mysql/bin/mysqld
   358  ??  S+ 0:00.01 grep mysql
--- I ran it a second time to explore:
[localhost:/usr/local/mysql] hlutz% ps ax | grep mysql
   255  ??  S  0:00.17 sh ./bin/safe_mysqld
   298  ??  S  0:01.09 /usr/local/mysql/bin/mysqld
   358  ??  R+ 0:00.00 grep mysql
[localhost:/usr/local/mysql] hlutz% su root
Password:
[localhost:/usr/local/mysql] root# kill -9 255 298
[localhost:/usr/local/mysql] root# cd
 I do not know why I changed the directory 
 but I think it should not be the problem
[localhost:~] root# /usr/local/mysql/bin/mysqld -Sg
Fatal error: Please read security section of the manual to find out how
to run mysqld as root!
020129 18:45:15  Aborting

020129 18:45:15  /usr/local/mysql/bin/mysqld: Shutdown Complete

 I changed the user and ran it a second time to explore:
[localhost:~] root# su hlutz
[localhost:~] hlutz% cd /usr/local/mysql
[localhost:/usr/local/mysql] hlutz% /usr/local/mysql/bin/mysqld -Sg
/usr/local/mysql/bin/mysqld: Can't change dir to
'/usr/local/mysql-3.23.46/data/' (Errcode: 13)
 I think it was wrong when I spoke of 3.23.47 in the mail-reference
line!!!
020129 18:47:31  Aborting

020129 18:47:31  /usr/local/mysql/bin/mysqld: Shutdown Complete

[localhost:/usr/local/mysql] hlutz%
 stopped here because it seems not to work properly.
---

Can there be anything with the user mysql and the group mysql which I
created with the NetInfo Manager? I can not login within the terminal as
user mysql (% su mysql). A password is wanted, but I did not set one on OSX
level.

Can there be anything with accessrights because all files in
/usr/local/mysql belong to the group mysql and user mysql and not partly to
root (and wheel before - whatever user wheel is). 

Thanks, Helmuth

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php