View previous topic :: View next topic |
Author |
Message |
AhmadFarhan n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 Jan 2005 Posts: 31
|
Posted: Fri May 13, 2005 4:17 am Post subject: help with mysql privileges |
|
|
well i had my server set up before but soething happened and i had to do a reinstall..
the problem i have now is that mysql won't accept any connection from anything other than localhost..
i have the privilege tables set up already and i have an entry for root@% ( iknow that's bad but it's a development machine, only connected to lan)
so i'm guessing it's a mysql configuration that needs tweaking somewhere
the problem is that i'm using a windows machine and i use mysql admin to do most stuff.. and it worked before..
this is my my.cnf
Code: |
/etc/mysql/my.cnf
# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.14-r1,v 1.2 2004/07/18 02:47:43 dragonheart Exp $
#
# This file can be simultaneously placed in three places:
# 1. /etc/mysql/my.cnf to set global options.
# 2. /var/lib/mysql/my.cnf to set server-specific options.
# 3. ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!
[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock
[safe_mysqld]
err-log = /var/log/mysql/mysql.err
[mysqld]
#skip-innodb
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
log-error = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
# file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
# the master logs.
# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable = binlog-do-db=non_existant
# set-variable = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id = 207
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
# keep secure by default!
#bind-address =127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking
[mysqldump]
quick
set-variable = max_allowed_packet=1M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
set-variable = key_buffer=16M
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Fri May 13, 2005 8:13 am Post subject: |
|
|
The my.cnf file has nothing to do with privileges.
Check the mysql database. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
BastianBalthazarBux Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/gallery/Star Wars/movie_star_wars_chewbacca.gif)
Joined: 10 Dec 2004 Posts: 78
|
Posted: Thu Jul 28, 2005 4:16 pm Post subject: Re: help with mysql privileges |
|
|
you need two sessions
1st session
Code: |
#/usr/sbin/mysqld \
--skip-grant-tables \
--basedir=/usr \
--datadir=/var/lib/mysql \
--skip-innodb \
--skip-bdb \
--max_allowed_packet=8M \
--net_buffer_length=16K \
--socket=/tmp/my.sock \
--pid-file=/tmp/mysqld.pid"
|
Add --skip-ndbcluster if compiled with USE="cluster"
2nd session
Code: |
# mysql \
--socket=/var/run/mysqld/mysqld.sock \
-hlocalhost
|
Code: |
mysql> UPDATE mysql.user SET Password = PASSWORD("YOUR PASSWD HERE") WHERE USER='root';
|
cheers |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|