![]() ![]() In the previous code example, we created and closed a connection to a server using an XSession as you can see the code is very simple and easy to read. The following example demonstrates how to connect to a single MySQL Server using XSession: var mysqlx = require('mysqlx') Run the following command: INSTALL PLUGIN mysqlx SONAME ‘mysqlx.so’ Ĭlick here for more information about how to setting up MySQL as document store.Ĭreating a connection to a MySQL server as a document store is quite similar to create a connection to a traditional MySQL server we require the following connection parameters: host, database user, user password, and port.Invoke the MySQL command-line client: mysql -u user –p.To enable the XPlugin in the MySQL server using the MySQL Client command line you need to use the root account or an account with INSERT privilege to ugin table: Multiple MySQL Cluster nodes and the NodeSession serves as an abstraction for a physical connection to exactly one MySQL server running the X Plugin. ![]() There are two types of session that a connection can provide: XSession and NodeSession.Īn XSession encapsulates access to a single MySQL server running the X Plugin or In this post we are going to explain how to connect a Node.js application to a MySQL server using the new MySQL Connector/Node.js needless to say that we will be using the MySQL server as a document store. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |