[Gambas-user] mysql problems

Benoit Minisini gambas at ...1...
Tue Feb 19 16:08:17 CET 2008


On mardi 19 février 2008, Zano wrote:
> Ron Onstenk ha scritto il 02/19/2008 06:15 AM:
> > You should use a mysql admin program, like phpadmin or mysqladmin
> > and add a user 'Zano' with or without password to the mysql server.
> > You must do it as mysql root user here.!!!
>
> Sorry, but it doen't work.
> I've created the user zano with ALL priviledges, I can run it from terminal
>
> ===================================================================
> bash-3.2# mysql -u zano -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 5
> Server version: 5.0.51-log Frugalware Linux - mysql-5.0.51
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> show databases;
> +--------------------+
>
> | Database           |
>
> +--------------------+
>
> | information_schema |
> | mysql              |
> | test               |
> | wikidb             |
>
> +--------------------+
> 4 rows in set (0.00 sec)
>
> mysql>
> ===================================================================
> but I get error when run from gambas
>
> This is the code I use from inside gambas
> ==================================================================
> PRIVATE $hConn AS Connection
>
> PUBLIC SUB btnConnect_Click()
>
>    DIM sName AS String
>
>    TRY $hConn.Close
>    '$hConn = NEW Connection
>    WITH $hConn
>      .Type = "mysql"
>      .Host = "localhost"
>      .Login = "zano"
>      .Password = "mypassword"
>      .Port = "3306"
>      .Name = ""
>    END WITH
>
>    $hConn.Name = "zano"
>    $hConn.Open
> ==================================================================
>
> While writing this mail, I'm in question.
> I run the the modified example "database" in gambas package, it shows a
> form, a click on connect and I get the error.
> Is it possible there is a problem in the form or something associated
> with it?
>

I think it is a problem in some mysql configuration file, because, to connect 
to the database, Gambas does nothing more than using the property of the 
Connection object. 

I cannot tell you more, except that nobody else have such a problem with the 
Database example, and I never got it during the development, with many 
different mysql versions.

Regards,

-- 
Benoit Minisini




More information about the User mailing list