If you have a problem with SELECT NOW()
returning values in GMT and
not your local time, you have to set the TZ
environment variable to
your current time zone. This should be done for the environment in which
the server runs, for example, in mysqld_safe
or mysql.server
.
See section F Environment Variables.
Posted by [name withheld] on Friday May 17 2002, @6:24am | [Delete] [Edit] |
I am having problems using the mysqladmin
program in 3).
Connecting with the mysql client works just fine
though :-)
Posted by Hardly Boffin on Wednesday December 18 2002, @5:28pm | [Delete] [Edit] |
As a new user i find this very confusing..
I was able to find another refference with easier
examples at http://www.codebits.com/bit.cfm?BitID=120
1. /usr/local/mysql/bin/safe_mysqld
--skip-grant-tables &
2. /usr/local/mysql
3. use mysql;
4. update user set password = password('.......')
where user = 'root' and host='localhost';
5. Stop and Start the MySQL server.
Posted by [name withheld] on Friday May 17 2002, @6:24am | [Delete] [Edit] |
Restart mysqld with the --skip-grant-tables
option.
Yes, quite confusing. Especially point #3 and
the "Note":
3. Connect to the mysqld server with mysql -h
hostname mysql and change the password with a
GRANT command. See section 4.3.1 GRANT and REVOKE
Syntax. You can also do this with mysqladmin -h
hostname -u user password 'new password'
"Note that after you started mysqld with --skip-
grant-tables, any usage of GRANT commands will
give you an Unknown command error until you have
executed FLUSH PRIVILEGES."
Posted by Rusty Carruth on Wednesday December 18 2002, @5:27pm | [Delete] [Edit] |
Let me try to help clarify with a howto:
First, set things up:
log in as root.
stop mysql (/etc/rc.d/init.d/mysql stop)
start mysql in ignore mode (/usr/bin/safe_mysqld
--skip-grant-tables &)
now, change the password for root user:
mysql -p
<enter root password? if requested, or don't use
the -p option>
use mysql;
update user set password=password('newpass');
quit
/etc/rc.d/init.d/mysql stop # Stop the insecure
server
/etc/rc.d/init.d/mysql start # restart it in
normal mode
Ok,now root's password is 'newpass'. Now, to
change password for user 'joe_user', do this as
root:
mysqladmin -u joe_user password newpass -p
(enter root password - newpass in this case)
Repeat for all users (bug please don't use
'newpass' as the password!).
I wish I had found a way to do this without having
to type the new password on the command line, but
I could not. Hopefully someone else will figure
it out and comment here...
Hope this saves someone the time *I* spent on
this!
rc
Posted by Richard Lloyd on Friday May 17 2002, @6:24am | [Delete] [Edit] |
I just downloaded the Linux 3.23.49a RPMs and the
default location for the creation of mysql.sock is
NOT /tmp !! It's actually in /var/lib/mysql. This is
quite serious because not only doesn't this match
all the online docs and mysqld man page, it also
causes a problem if MySQL isn't running when you
configure PHP because the latter defaults to
/tmp/mysql.sock and if you then try to connect
locally to mysql via PHP, it'll fail.
Posted by [name withheld] on Wednesday December 18 2002, @5:28pm | [Delete] [Edit] |
Example:
safe_mysqld -O max_connections=300 --timezone=GMT-
2.
It doesn't seem like MySQL understands anything
else than GMT[+][-]X
Posted by [name withheld] on Wednesday July 2 2003, @1:20am | [Delete] [Edit] |
How can I change the timezone information to MySQL on a Windows NT4SP5 System running the mysqld-nt.exe as a service?
Does mysqld_safe (or safe_mysqld) exists on a Windows-MySQL?
Any help is a appreciated.
Regards
Sebastian