mysql

Avoiding errors concatenating fields with numerical values in SQL Server

  • Star
  • Star
  • Star
  • Star
  • Star

concatenate stringsThe operator to concatenate in SQL Server is '+', but this operator is also used to add values.

 

Being the same operator for both, the query analyzer makes a concatenation or a sum based on the type of data fields being treated. If the fields are of 'string' type, the operator concatenate, and if it has numeric fields, two integers, for example, it add the two values.

How to connect to a remote MySQL database

  • Star
  • Star
  • Star
  • Star
  • Star

 

MySQL has some special features when making a connection from a remote client that if we do not know can complicate access to a MySQL database from a different machine that hosts the database.

With other databases such as Oracle or SQL Server, once that no firewall or anything like that prevents us from the client machine access to the server, using normally data acces from a database user we can 'enter'.

With MySQL, although access to the port, usually 3306, is open, the database can be configured to shut out external connections, and the result is the same as if the port was closed by a firewall:

 

telnet mysql.dataprix.es 3306
Trying 188.166.233.199...
telnet: connect to address 188.166.233.199: Connection refused
telnet: Unable to connect to remote host

 

If you get this result should consult the file /etc/my.cnf, and checking for bind-address variable or skip-networking.

If skip-networking is and is not discussed, edit the file and delete it, or make a comment to have no effect and allow external connections: