Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Ado Connection String For Tcpip Port


Currently I connect to MySql using the following vbscript:

set conn = createobject("ADODB.Connection")
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=localhost;"_
& "DATABASE=test;"_
& "UID=venu;PWD=venu;OPTION=3"
conn.open()

I would like to change my connection string so that I connect using
TCP/IP and I would like to specify port 3306 inside the string. I
know how to do this with MS SqlServer, but does someone know how to do
this with MySQL?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Connection String
If i'm right, all MySql databases are stored in some subfolders under InstallDir/Data...
This folder can be set using some configuration parameters like 'Datadir' or something like this.

Well, i want to connect to some database stored in some folder outside this one. For example i want to manage one database in drive D:myDatadata1 and a second one stored in drive F:somedatamyDatadata123.

Using Interbase i write my ConnectionString in this way:
'..... DatabaseName=192.168.1.60:C:staffibITI.gdb....'
In MySql this does not work|

Is it possible to connect to a database outside the 'Datadir' settings?

Connection String
I am using the following code in Access 2k to establich a connection to a
MYSQL database

Dim conn As ADODB.Connection

Set conn = New ADODB.Connection

conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};DESC=;USER=" &
myUsername_
& ";DATABASE=" & mySQLDatabase_
& ";SERVER=" & myServer_
& ";PASSWORD=" & myPassword_
& ";PORT=;OPTION=;STMT=;" ';TABLE=" & myTable
conn.Open

I get a Catostrophic failure error on the conn.Open line.

Connection String
Why this is not working
I'm putting this connection string with the follwing batch file:
mysql --user=root --password=mypassword < batchfile.txt
It never executes the batchfile. How do I have to do it

Connection String
i need to write the connection string in c# for .Net 1.1 with Mysql.

i am new to MySql,can somebody tell me how to do it

Connection String From Db.asp To MySQL DB
I have a project that was originally developed to run on an access db due to it's lack of traffic, now I trying have the same project use MySQL as it's db in anticipation of more traffic.

Below is the connection string for my Dev (local) site.

ConString = "Driver={MySQL ODBC 3.51 Driver}; Server=216.251.43.11; Database=c:/program files/mysql/MySQL Server 4.1/cdi_cdnsys_com; UID=****; PWD=****; Option=3"

Connection String From Windows, Please Help
I have just installed mysql via the new windows installer program on my Windows XP Pro machine, and everything works perfectly. Now I would like to make a connection from an asp page to the database (locally on my computer)

The connection string which I use on my mysql database on my web site (externally) is

<%
set Conn = server.CreateObject("ADODB.connection")
Conn.open "Provider=MySQLProv;Location=mysql.myweb.com;Data Source=lacanela;User Id=myname;Password=mypw;"
%>

and that works perfectly.

Now I would like to use the same string for local connections on my PC.

I have tried:

<%
set Conn = server.CreateObject("ADODB.connection")
Conn.open "Provider=MySQLProv;Location=localhost;Data Source=localhost;User Id=root;Password=pw;"
%>

But I get the following error message:

ADODB.Connection (0x800A0E7A)
Provider cannot be found. It may not be properly installed.

That leads to several questions:

- Are the Location and Data source arguments correct? (I did not specify anything particular when installation windows package, the user root was automatically created.

- Do I have install something extra in order to make MySQLProv work locally on my computer?

Are there any alternatives to MySQLProv (I prefer OLEDB, not OBDC) - already natively available on win XP Pro?

DSN_Less Connection String
I am trying to get a dsn-less connection string to work with MySQL version 4.0.12/ODBC 3.51. What I have is:

driver={MySQL};database=doitquick;server=127.0.0.1;uid=username;pwd=password;option=16386;

Anyone shed some light on this?

Ado Connection String Error Through Vb
I'm using mysql-5.0.1-alpha-snapshot-win & VB 6.0

  I'm having trouble connecting to the database server over a lan.

  When I use the following connection string from the server it works fine. -

adoCon.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=MyDatabase;uid=root;"

  When I use the the following connection string from another computer I get this error -

adoCon.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};SERVER=192.168.0.2;DATABASE=MyDatabase;uid=Tom;pwd=X12;"

Run-time error '-2147467259(80004005)'

[MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '192.168.0.2' (10060)

Also when I try the last connection from the database server and in vb (not compiled) I get the following error -

Run-time error '-2147467259(80004005)'

[MySQL][ODBC 3.51 Driver]Client does not support authentication protocol requested by server; consider upgrading MySQL client

In MySQL CC under users -
Username = Tom
Host = %
Password=X12

Global privileges and MyDatabase are checked with All Privileges

Connection String Authentication To My Server
I'm having a tough time figuring out the proper connection string to connect to my existing database.

Using:
* MySQL server 4.0 on a remote Linux Server.
* Developing in VS 2005 (VB) on a PC that is apart of our corporate MS domain.
* Downloaded and installed Connector/Net 2.0

Problem:
I'm using the connection string: ("server={0}; user id={1}; password={2}; database=test; pooling=false", server.Text, userid.Text, password.Text)

When executed with userid="sam" the error message that is returned is "Access denied for user: "sam@<mypc>.<corporatedomain>.com"

When executed with the userid="sam@<remotehost> the error message returned is "Access denied for user "sam@<remotehost>@<mypc>.<corporatedomain>.com". No matter what I do, the connector keeps appending my current domain id to the end of the user string.

"sam" is a authorized user for the MySQL on the remote linux host (been using it for years).

Server 2003 Connection String
I am running an sql script as part of an installer and it works fine on an XP machine, however when i run it on Windows Server 2003 it fails when it tries to open a connection.The connection string i am using is:

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=mysql;UID=root;PWD=;OPTION=16427"

My question is, does it need to changed for Server 2003?

MYSQL OleDb Connection String
I have this connection string
"Provider=MySQLProv; Location=localhost; Data Source=test_db;User ID=testuser;Password=testpass";
It works fine on the local host. However I need to connect to a data source on a different computer so I put in the host name for location and Im supposed to be able to use PORT=my_port_num for the port but whenver i use this string
"Provider=MySQLProv; Location=localhost; Data Source=test_db;User ID=testuser;Password=testpass; Port = 9999"; it comes up with a dsn box to fill in the port.

Format Function In SQL String To Return From Numeric Field In Table To String
How would i form a format function in SQL string to return from numeric field in table to string:

1 --> '001'
5 --> '005'
57 --> '057'
125 --> '125'

Port Range
What range of ports does MySQL use because I need to set it up with my firewall. At the moment i have added 3306 but when it changes port to one in whatever the range is it says lost connection to server. It works fine with firewall off.

Can I Run Two Instances On Same PORT
I am using mysql and like to know the possibilities of running two instances in same port?

What Port Does Mysql Use For SSL?
I can't find it documented what port the mysql server uses to listen for SSL connections. I'm trying to figure out what port to open up in the firewall. I'm using mysql 5.0.24a on RHEL 4.

Port 3306
I'm trying to install my sql on a w2k3 std box....... I get the firewall setting error message... I open up the port (like stated in all the many topics I've seen here.... I STILL get the same massage. What the hell do I do? I tried earlier versions up to ver 4.1 and still the same thing.

Can't Connect Port = 0??
I have root access to this server which has been preconfigured. I can
connect using the mysql command tool. But I cannot connect using any
mysql GUI software (I am currently tunneling the 3306 port to 3306 on
the server using SSH). So i ran mysqladmin variables. And got the
following:

port 0

instead of the usually port 3306. Obviously I cannot connect on port 0.
How can I troubleshoot this and get mysql running so I can connect via
tunneling?

MySQL Port
How do I check that what Port number is MySQL is running on it? I type this command: netstat -a did not show anything yet.
But I know that mysql run 3306 as default number, but when I run the following command: netstat -a | grep 3306 gives the following warning: 'warning, got duplicate tcp line'

Default Port Of Mysql
I've installed mySQL-essential-4.1.22-win32.

And it doens't connected to my coldfusion webserver because of port problem.

What is the default port of mySQL-essential-4.1.22-win32?

On What Port Is MySQL Running?
I'm running MySQL on my Mac, and I'm trying to figure out on what port MySQL is running. What can I type into Unix terminal to figure this out? Or can I find out some other way?

Open Additional Port
I need to access an external MySQL db through a firewall. I'd like to open up an additional port (leaving 3306 as is) to the same MySQL instance.
For example, I have my mail server running on both ports 25 and 26 (ISP blocks outbound 25).

Port 3306 - Can't Get Started
I have tried to install MySQL 4.0.14 on my Pentium 1.7Ghz running WindowsXP
Professional.

the installation ran through without any problems.

However, every command gives an error:
C:mysqlin>mysql
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

C:mysqlin>mysql --install
mysql: ERROR: unknown option '--install'

C:mysqlin>mysqladmin -u root shutdown
....failed - and it suggested I telnet localhost 3306

C:mysqlin>telnet localhost 3306
Connecting to localhost...Could not open connection to the host, on port
3306: Connect failed

C:mysqlin>mysqladmin test
mysqladmin: connect to server at 'localhost' failed.

MySQL Server On Different Port
Because I'm using a Java program that connect to my MySQL server from a remote location that doesn't allow connecting to port 3306.

I'm forced to change the port to a number that will work on the client end. Port 23 is allowed and since I don't run a telnet server, I'd like to run MySQL on port 23 instead of 3306. I change it to port 23 in the my.conf file, but the service won't start. I can make it port 3310 and it'll start just fine. Why won't it let me use 23?

Port 3306 - Can't Get Started
I have tried to install MySQL 4.0.14 on my Pentium 1.7Ghz running WindowsXP
Professional.

the installation ran through without any problems.

However, every command gives an error:
C:mysqlin>mysql
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

C:mysqlin>mysql --install
mysql: ERROR: unknown option '--install'

C:mysqlin>mysqladmin -u root shutdown
....failed - and it suggested I telnet localhost 3306

C:mysqlin>telnet localhost 3306
Connecting to localhost...Could not open connection to the host, on port
3306: Connect failed

C:mysqlin>mysqladmin test
mysqladmin: connect to server at 'localhost' failed..

Changing Mysql Port
How do you change the mysql port?

Opening Mysql Port
What I want to do is to open the mysql port. So I can access it from an other computer. How do I do this? I guess it's in an config file, But wich?

MySQL Server Port
whats the name of the config file I can edit so that mysql listens on port 3306. I dont seem to have a *.cnf file that acts as the mysql config file.
Better yet, what tool can I use to determine what config file was used

Changing Mysql Port:
How do you change the mysql port

MySQL Port 3306
I want to run MySQL on server but it only be accessible to programs on
localhost. I see that port 3306 is open on server so I need to close
it.How do I do that while keeping it available to programs running on
localhost?

MySQL Multiple Port Numbers
Have a LAMP server and am trying to get MySQL to listen on multiple ports.. I need 3306 and 3307 and I just can't figure out how to get it to listen on both, one or the other just not both at the same time.

MySQL 4.0.1 Port 3306 Error
I am trying to run the server on my PC and have already got Apache and PHP working fine. Whenever I run MySQL 4.0.1 Gamma however, a port 3306 error comes up saying that I possibly have another copy of the MySQL server already running which is not true. Also, I have noticed that my internet connection ceases to function along with Apache and everything tells me I'm behind an unknown proxy server.

Cannot Remote Access On Non-default Port
On  MySQL server running on UNIX machine I changed the default port 3306 to 40006.  From Windows PC I ran this command:  mysql -p -u user1 -h mysqltest:40006 testdatabase

It does not work.  It only works if I use the default port 3306.
How can I remote access on non-default port?

How To Change Root Password And Port
I have recently installed MySQL 3.23 on Windows 2000 Server. Can anyone tell me how do I change the root password and default port of MySQL?

Access Denied With Port 3306
here is my problem

I get the error "access denied for user root@localhost" with a note that if I have a firewall I should open port 3306

I really have a Norton 2005 firewall enabled and I do not know how to open port 3306
although I give a rule to all mysql services to use any ports.

Authentication Problem On Nonstandard Port
I am running two database instances of mysql (one on a nonstandard
port). After granting users permissions I find that I can access
mysql from other machines only if I use the standard port. When I use
the non-standard port I can only authenticate if I am on the box where
the database is running. Also some previously set up users can
authenticate through the non-standard port (sadly no one knows how
those users were set up). What do I need to do to allow for
authentication on the nonstandard port ex:

mysql -h<HOST> -u<USERNAME> -p
(defaulting to standard port works)
mysql -h<HOST> -u<USERNAME> -P<NON-STANDARD PORT> -p
(fails)

How To Shutdown MySQL Default Port (3306)
i am Using Mysql default port 3306 I have created database and now I want to shut the port so i can used my other application of Instant Rails which uses Mysql to run that port. Can you plz jus help me how to shutdown the default port so i can use another application.

Mysql Commandline Tool -- Port Broken
the "mysql" command allows me to use any ridiculous number after "--port=", even "80", as shown below. I can even use a random string like "abcd" in place of "80".

Exactly what I want to do? I need to experiment with the "mysql" commandline tool together with tcpdump. So far, my tcpdump command cannot detect *any* thing about mysql.

yes my tcpdump can detect http traffic.
yes my tcpdump can detect something when i run "telnet loalhost 3306".

------------- snip ---------------
$ mysql -u xxx -pxxxxxx -h localhost --port=80 -vvv
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8319 to server version: 3.23.58

Reading history-file /home/httpd/vhosts/portal.crpp.servy.net/.mysql_history
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

Connector/ODBC Not Saving Port Setting
Using MySQL Connector/ODBC 3.51, I set the port to a non-default value
(3309), under 'Connection Options' to connect to a remote machine running 2
versions of MySQL. 'Test' is successful but when I close the Connector/ODBC
window on XP the port setting is not saved so the DSN doesn't work.

Close Mysql Port Or Bind It To Only Localhost Or ...
I only use mysql locally. I want to

- close port 3306 if possible (like starting Oracle database without
starting listener),
- or bind it to localhost only (like what sendmail does),
- or next best thing

for security.

I am on redhat 9, and use mysql 3.23.55. I can upgrade if newer
version provide the functionality.

Internet Port 3306 Open Safe
I have a server at an ISP - I've got port 3306 open in the firewall so
that I can work from remote however its got me thinking if its safe? I
know Microsoft got hit with slammer (or whatever) worm on their
unpatched machines that were exposed to the outside world, but I'm
trying to measure up the risks by having my db server exposed for a few
weeks.

Mysql Command Line Client Ignores Port Number
I am running 4.1-7 on an SGI (unix.) The server is listening on port 3307.

I can connect like:
mysql -uusername -ppassword -P123 -hhostname database
and I can also connect like:
mysql -uusername -ppassword -P3307 -hhostname database

and they BOTH connect!

It seems that mysql ignores the port number passed in on the command line.

Is it reading a config file that I am missing (if so, why doesn't the command line port override whatever is set in this file.)

How To Connect Directly To Mysql Server Port (3306) Using TCP/IP Protocol
I want to develop an application in LabWindows/CVI (ANSI C developpment software for instrumentation) from which I could connect directly to mysql server port (3306) using TCP/IP protocol. This developpment environment allows me to use functions to connect, read and write to a certain port using TCP/IP protocol. I must say I'm new to using MySQL and I searched the manual without any response to my question.

How Do You Replace A String With Another String
How do I write a query in myPHP admin to search through a particular field in a particular table for a string and replace it with another string? The string is only a part of the value of that field. For example, how would I change "Hello there" to "Hi there"?

Changes Made In One Connection Does Not Reveal In Another Connection At Once.
I use many connection and the same as many threads in my server app to gain performance on a multicpu machine.

Firstlly i call "set autocommit=0" and wrap every statements with "start transaction " and "commit". i use mysql_stmt_execute for every statement rather than mysql_real_execute except those that can't be prepared. The version of mysql is 4.1.11 under Debian linux.

In one connection of one THREAD i insert a row into a table. After i got the sucess code and the last insert id, i then do a "select" from another connection in another THREAD with the "last insert id" return by the previous insert . I expect the select can fetch the row that i have just insert , but some time it does and some time it doesn't.

is there any funtion like "mysql_....flush...cache.." to make the changes from one connection to be reveal to the global at once?

Backup MySQL Via Port 3306 (which Tool? Automatic Backup?)
i have quite a big database on my website - and i cannot get any backup via system dump or scripts anymore, because my hoster added some memory limits - and scripts/dump can't finish...

so the only way left is to backup my database via connection to port 3306 and tools like mysqlfront.

mysqlfront is unfortunately quite slow and buggy - so do you know any tools which can backup databases via external connection? - it would be great if there are tools which run automatically? (batch/commandline??)
backup with mysql.exe - h -u .... is impossible, too!

SQL String
I have VB6 app connected to a MySQL 4.1 database.
I am using ADO and myODBC to connect to the database on a webhost, and successfully return data to my forms.
My problem is that I need an SQL string to call records where the date is equal to today.

The string I've used is like "SELECT * FROM tblCalls WHERE CallDate='" & Format(Date,"yy-mm-dd")'".  When I populate my ADO control, with the SQL as its recordsource, I get all records back, i.e. it won't filter by today's date.
Can anyone tell me how I need to construct my SQL string to apply the filter I want?
Apologies if there's already a post about this, but I've tried to search this forum, and the MySQL forum with no luck.

Get String Of Certain Fields
Hi all! please bear with me as im not familiar with mysql... just can set up a database but thats about it.
I have a table for clothing, and for each item i have an 'enum' field for every colour available where i choose a &#390;' or &#391;' depending whether that colour is available for that item or not. There are many other fields in this table but the colours are the only ones im concerned with at the moment.
I'm just after how to get the string with the colours, that i can then explode onto my page. Once they are set out in a list im after adding a checked="checked" option to the radio button of the 1st item displayed.
Im not sure whether i'm making any sense whatsoever so you can view the original thread i made in the php forum that reffered me to here. Sorry if this is pretty vague let me know if u want me to elaborate on anything

String As Primary Key
www.site.com/abc
www.site.com/xyzzzz

"abc" and "xyzzzz" are names of products, and are unique.

This would mean that in my database design, I store the product ID as a string (primary key). Does this impact performance speed at all, vs. if I stored the product IDs separately as a number?

I've thought of storing them as numbers, but then it wouldn't be as easy to remember. Users would have to type:

www.site.com/3235389

to get to product "abc". However nobody would remember a number. It would be easier for them to remember "abc".

What are your thoughts? Storing a string (can be up to a few hundred characters long) as the primary key, is it ok for performance?

Which String Type Should I Use?
I am currently using a Text string type to store some webpage data. The webpage is not that large.

What is the maximum number of characters a Text string type can hold?


Copyright © 2005-08 www.BigResource.com, All rights reserved