在使用nodejs的mysql时需要帮助

时间:2021-06-15 01:53:19

Hi just now i have installed mysql for nodejs in my windows machine. What is the default username and password for this. And how to see the databases available? Is there anything like phpmyadmin to see the dbs and tables in node? I didn't get any good explanation for this by Googling. Please help?

嗨,刚才我已经在我的windows机器上为nodejs安装了mysql。这是什么默认用户名和密码。以及如何查看可用的数据库?有什么像phpmyadmin在节点中看到dbs和表吗?谷歌搜索我没有得到任何好的解释。请帮忙?

4 个解决方案

#1


0  

Do you want GUI ? if yes then use Mysql GUI tool here from you can download it for windows

你想要GUI吗?如果是,那么在这里使用Mysql GUI工具,你可以下载它的Windows

http://mysql-gui-tools.softpedia.com/

#2


0  

exports.conn = require('mysql').createConnection({

  host : 'localhost',  /// mysql host
  user:     "****",   /// mysql username
  password: "***",   /// mysql password
  database: "db_name"

});

var queryString='SELECT * FROM .........';
conn.query(queryString, function(err, rows, fields) {
          if (err) { 
               .........................
           }else {
               ............................
           }

});

#3


0  

MySQL for NodeJS is a library not an application. Since it's a library it was intended for programmatic use in your applications.

用于NodeJS的MySQL是一个库,而不是一个应用程序。由于它是一个库,因此可用于在应用程序中进行编程。

If you waned an application which allows you to admin your databases using NodeJS then probably express-admin would be what you are looking for.

如果你使用NodeJS管理你的数据库的应用程序已经衰落,那么很可能是express-admin将是你正在寻找的。

express-admin is an application built using NodeJS and using the MySQL library for NodeJS.

express-admin是一个使用NodeJS构建的应用程序,它使用NodeJS的MySQL库。

#4


0  

The default username for MySQL is root and the password is not set. Set the password as soon as possible.

MySQL的默认用户名是root,密码未设置。尽快设置密码。

As for GUI's, you could use an offline GUI for MySQL like HeidiSQL or Webyog. I find it easier to use a non-HTTP interface as it feels a bit less clunky.

至于GUI,你可以使用像HeidiSQL或Webyog这样的MySQL离线GUI。我发现使用非HTTP接口更容易,因为它感觉不那么笨重。

If you want to start accessing your MySQL databases for use in your Node application, use the node-mysql module. This is a library for making communication with MySQL easier from Node.

如果要开始访问MySQL数据库以在Node应用程序中使用,请使用node-mysql模块。这是一个从Node更容易与MySQL进行通信的库。

If this is your first time using Node then I recommend getting to grips with some of the basic functionality first. Understanding its modular approach is key to writing good applications.

如果这是您第一次使用Node,那么我建议您首先掌握一些基本功能。了解其模块化方法是编写优秀应用程序的关键。

#1


0  

Do you want GUI ? if yes then use Mysql GUI tool here from you can download it for windows

你想要GUI吗?如果是,那么在这里使用Mysql GUI工具,你可以下载它的Windows

http://mysql-gui-tools.softpedia.com/

#2


0  

exports.conn = require('mysql').createConnection({

  host : 'localhost',  /// mysql host
  user:     "****",   /// mysql username
  password: "***",   /// mysql password
  database: "db_name"

});

var queryString='SELECT * FROM .........';
conn.query(queryString, function(err, rows, fields) {
          if (err) { 
               .........................
           }else {
               ............................
           }

});

#3


0  

MySQL for NodeJS is a library not an application. Since it's a library it was intended for programmatic use in your applications.

用于NodeJS的MySQL是一个库,而不是一个应用程序。由于它是一个库,因此可用于在应用程序中进行编程。

If you waned an application which allows you to admin your databases using NodeJS then probably express-admin would be what you are looking for.

如果你使用NodeJS管理你的数据库的应用程序已经衰落,那么很可能是express-admin将是你正在寻找的。

express-admin is an application built using NodeJS and using the MySQL library for NodeJS.

express-admin是一个使用NodeJS构建的应用程序,它使用NodeJS的MySQL库。

#4


0  

The default username for MySQL is root and the password is not set. Set the password as soon as possible.

MySQL的默认用户名是root,密码未设置。尽快设置密码。

As for GUI's, you could use an offline GUI for MySQL like HeidiSQL or Webyog. I find it easier to use a non-HTTP interface as it feels a bit less clunky.

至于GUI,你可以使用像HeidiSQL或Webyog这样的MySQL离线GUI。我发现使用非HTTP接口更容易,因为它感觉不那么笨重。

If you want to start accessing your MySQL databases for use in your Node application, use the node-mysql module. This is a library for making communication with MySQL easier from Node.

如果要开始访问MySQL数据库以在Node应用程序中使用,请使用node-mysql模块。这是一个从Node更容易与MySQL进行通信的库。

If this is your first time using Node then I recommend getting to grips with some of the basic functionality first. Understanding its modular approach is key to writing good applications.

如果这是您第一次使用Node,那么我建议您首先掌握一些基本功能。了解其模块化方法是编写优秀应用程序的关键。