Re: how do I make utf8 the default encoding for my MySQL installation

2011-11-17 Thread Duane Hill
On Friday, November 18, 2011 at 03:31:44 UTC, martin.muel...@mac.com 
confabulated:

> Is it possible to make utf8 the default for all databases and transactions
> in a MySQL installation?

> The current default is Latin1. There is a suggestion on the Web to edit
> the my.cnf file as follows


> [mysqld]
> init_connect=’SET collation_connection = utf8_general_ci’
> init_connect=’SET NAMES utf8′
> default-character-set=utf8
> character-set-server=utf8
> collation-server=utf8_general_ci
> skip-character-set-client-handshake

> On a Mac with MySQL 5.5.17 this produces the error

>  [ERROR] /usr/local/mysql/bin/mysqld: unknown variable
> 'default-character-set=utf8'

> The Reference Manual is very tortuous but lacks instructions that are
> clear to a not very technical user. 

http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-character-set

The above link says default-character-set is depreciated and you should
be   using  character-set-server. It also states default-character-set
was removed in v5.5.3.

You should be able to remove the option.

-- 
There  are  10  kinds  of  people in the world... Those who understand
binary, and those who don't.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



how do I make utf8 the default encoding for my MySQL installation

2011-11-17 Thread Martin Mueller
Is it possible to make utf8 the default for all databases and transactions
in a MySQL installation?

The current default is Latin1. There is a suggestion on the Web to edit
the my.cnf file as follows


[mysqld]
init_connect=’SET collation_connection = utf8_general_ci’
init_connect=’SET NAMES utf8′
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_general_ci
skip-character-set-client-handshake



On a Mac with MySQL 5.5.17 this produces the error

 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable
'default-character-set=utf8'

The Reference Manual is very tortuous but lacks instructions that are
clear to a not very technical user. 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Can't run MySQL under Cygwin : connect to server at 'localhost' failed (only when using password)

2011-11-17 Thread Reindl Harald


Am 17.11.2011 15:02, schrieb Franck Houssen:
> $ mysql -u dummy -p (when I hit "return" as a password => connection OK)
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> mysql> show tables;
> ERROR 1046 (3D000): No database selected
> mysql> quit
> Bye
>  
> $ mysql -u dummy -p (when I type a real password : dummy, YES... or anything 
> else)
> ERROR 1045 (28000): Access denied for user 'dummy'@'localhost' (using 
> password: YES) $ 

well this is not a connection problem
your permissions in the mysql-user-tables are wrong

remember that "localhost" is not the same as "127.0.0.1" and acess is
granted by user/host/password combinations or not since you have
in all permissions records a field for "host"




signature.asc
Description: OpenPGP digital signature


Can't run MySQL under Cygwin : connect to server at 'localhost' failed (only when using password)

2011-11-17 Thread Franck Houssen





Hello mysql-list, 
I try to install MySQL under Cygwin : I can build (mysql-5.5.17 on windows 7 
using Cygwin), I can start and stop the server (only using mysqld.server - 
mysqladmin fails to connect).
I can not connect to the server when I want to use a password (if I don't use 
any password the connection to the server succeeds).
 
I need client AND server. I followed the on line mysql doc. Some comments about 
the installation / running process that I would underline :I do NOT use 
--without-server option in configure (I need the server)I use readline (ccmake 
configuration) and not libedit : could this be a problem ?I used  
mysql_install_db with --basedir, --datadir and --skip-name-resolve optionsI use 
a user "dummy" (that belongs to the mysql group) : I can not create the mysql 
user (Windows prevent me from creating a mysql user for a reason I can't figure 
out : I stopped fighting with Windows. As mentionned in the on line doc, MySQL 
should work with any user : "dummy" is my user and the password is "dummy")the 
root user doesn't exist in Cygwin (as far as Iunderstand) : I can't use any 
"mysqlamdin -u root ..."  
When I use "mysql" or "mysqladmin" triggering a connection using a password, 
the connection fails (but succeeds if no password is used). May be someone 
could find a clue to solve this problem !... Could someone help me ?
 
Thanks
 
F.
 
Here after is a detailed description of the problem :  My configuration file 
my.cnf is (I tried to put the minimum things to make it work) : [client]
password = dummyport  = 3306
socket  = /tmp/mysql.sock
[mysqld]
port  = 3306
socket  =  /tmp/mysql.sock
datadir  =  /usr/local/mysql/datatmpdir = /tmp/
Here is a command line description of the problem : $ mkgroup -l > /etc/group 
(update groups Windows -> Cygwin)

 

$ mkpasswd -l > /etc/passwd (update passwords Windows -> Cygwin) $ more 
etc/group | grep mysql (check OK)
mysql:S-1-5-21-4028741454-3406211479-1246761672-1004:1004:

$ more passwd | grep dummy (check OK)
dummy:unused:1000:513:dummy,U-dummy-PC\dummy,S-1-5-21-4028741454-3406211479-1246761672-1000:/home/dummy:/bin/bash

$ chgrp -R None /tmp (give read / write access to all users)

 

$ chgrp -R None /var (give read / write access to all users)

  

$ ll (check OK)

total 229

drwxrwxrwt+ 1 dummy None   0 Nov 14 11:57 tmp

drwxr-xr-x+ 1 dummy None   0 Aug 17 20:58 var

 

$ chgrp -R mysql /usr/local/mysql (give read / write access to users of mysql 
group)

 

$ chown -R dummy /usr/local/mysql (give read / write access to users of mysql 
group)

  

$ ps (check : no server)

  PIDPPIDPGID WINPID  TTY  UIDSTIME COMMAND

 3400   13400   3400  con 1000 11:10:39 /usr/bin/bash

 675634006756   5400  con 1000 12:14:46 /usr/bin/ps

 

$ ll /tmp (check : no mysql.sock)

total 12

drwxrwxrwt+ 1 dummy None  0 Nov 14 11:57 .

drwxr-xr-x+ 1 dummy Administrateurs   0 Nov  5 00:37 ..

drwxrwxrwt+ 1 dummy None  0 Nov  9 18:40 .X11-unix

drwxr-xr-x+ 1 dummy None  0 Aug 18 00:00 hsperfdata_dummy

-rw-r--r--  1 dummy None316 Oct 26 09:13 xkb_4Di75h

-rw-r--r--  1 dummy None316 Oct 27 00:08 xkb_4NrKCL

-rw-r--r--  1 dummy None316 Oct 27 00:09 xkb_ThcsMy

-rw-r--r--  1 dummy None316 Oct 27 00:10 xkb_shbOiY

 

$ mysqld --user=dummy & (launch server : OK)

14 12:15:54 InnoDB: The InnoDB memory heap is disabled

14 12:15:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins

14 12:15:54 InnoDB: Compressed tables use zlib 1.2.5

14 12:15:54 InnoDB: Initializing buffer pool, size = 128.0M

14 12:15:54 InnoDB: Completed initialization of buffer pool

14 12:15:54 InnoDB: highest supported file format is Barracuda.

14 12:15:54  InnoDB: Waiting for the background threads to start

14 12:15:55 InnoDB: 1.1.8 started; log sequence number 1595675

14 12:15:55 [Note] Event Scheduler: Loaded 0 events

14 12:15:55 [Note] mysqld: ready for connections.

Version: '5.5.17'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution



$ ll /tmp (check: mysql.sock is created and can be accessed - read / write 
permissions)

total 13

drwxrwxrwt+ 1 dummy None  0 Nov 14 12:15 .

drwxr-xr-x+ 1 dummy Administrateurs   0 Nov  5 00:37 ..

srwxrwxrwx  1 dummy None  0 Nov 14 12:15 mysql.sock

 

$ ps (check: server launched OK) 

  PIDPPIDPGID WINPID  TTY  UIDSTIME COMMAND

 472034004720   6576  con 1000 12:15:53 
/usr/local/mysql/bin/mysqld

 $ mysql -u dummy -p (when I hit "return" as a password => connection OK)
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> quit
Bye
 
$ mysql -u dummy -p (when I type a real password : dummy, YES... or anything 
else)
ERROR 1045 (28000): Access denied for user 'dummy'@'localhost' (using password: