然后 进入到那个 mysql 的目录下, 再运行。
例如:
D:\>cd mys*
D:\mysql-5.1.50-win32>cd bin
D:\mysql-5.1.50-win32\bin>mysql
Welcome to the MySQL monitor. Commands end with or \g.
Your MySQL connection id is 1
Server version: 5.1.50-community MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help' or '\h' for help. Type '\c' to clear the current input statement.
mysql>use test
Database changed
mysql安装部署和配置:1.安装包:mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
2.解压:tar -zxvf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz
3.进入:cd /opt/ 并且把mysql-5.6.33-linux-glibc2.5-x86_64文件拷贝到当前目录 改名为mysql
4.创建分组和用户:groupadd mysql,useradd -r -g mysql mysql
5.建立连接:ln -s /E/mysql/bin/mysql /usr/bin/
6.初始化mysql ./scripts/mysql_install_db --user=mysql
7.权限设置:chown -R mysql data
8.复制配置文件:cp support-files/my-medium.cnf /etc/my.cnf
9.将mysqld服务加入开机自启动项,cp support-files/mysql.server /etc/init.d/mysqld
10.通过chkconfig命令将mysqld服务加入到自启动服务项中 chkconfig --add mysqld
11.查看是否添加成功 chkconfig --list mysqld
12.安装设置完成,重启mysqld服务或者重启系统:重启mysqld的服务命令:service mysqld start
MySQLConnection conn = nullconn = new MySQLConnection(new MySQLConnectionString("127.0.0.1", "china241_user", "root", "123").AsString)
conn.Open()
MySqlCommand cmd = new MySqlCommand(sql,conn) ----加的这句
MySQLDataAdapter mda = new MySQLDataAdapter(cmd)
DataSet dt = new DataSet()
mda.Fill(dt)//出错地方
conn.Close()
试试
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)