System Administrator a.k.a. The Root of the Problem writes:
> I am have a problem with the above syntax
Hello!
What is the problem exactly..? What is the error message you get?
You should use mysqlbug and please read the section
"how to report bugs / problems" from the manual.
See server-cfg file which comes with MySQL distribution
and how the connection is done there.
You can do:
$dbh =
DBI->connect(DBI:mysql:$opt_db:$opt_host:port=$opt_port:mysql_socket=$opt_mysql_socket",
$opt_user,$opt_password, { PrintError => 0})
There you have:
$opt_db == the database to use.
$opt_host == hostname to use
$opt_port == tcp port to use, normally 3306
$opt_mysql_socket == unix socket to use, normally /tmp/mysql.sock
But you can use, for example, just
$dbh = DBI->connect(DBI:mysql:$opt_db) || die $DBI::errstr;
if you want to.
> and that we have databases in the
> /var root directory that are being created.
>
> 1) How do we contril where the db is created?
Please see mysqld --help, and you'll find that you can control
this with option -h (or: --datadir=path)
> 2) When I call mysql, the database appears,
> but when I use something like wdbi's mysqlfdf,
> the programme cannot connect to an
> active mysql; why?
See above and please read the MySQL manual, everything is
described there.
Regards,
Jani
--
+---------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Jani Tolonen |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto: jani@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Helsinki |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|_____ Finland |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+---------------------------------------------------------------------+