如何将Mysql数据库作为多用户服务器 [英] How to Make Mysql database as a Multi user server
问题描述
你好
i我有两个远程MySQL数据库服务器,一个在社区服务器上有5.5社区版和win2012服务器操作系统,另一个有5.1社区版和winxp os on一台p4机器。对于这两者我有大约200多个用户通过winform应用程序访问数据。
现在我们计划在p4机器上升级我们的服务器并用win7购买更高端的机器,至强处理器配置,我们安装了MySQL 5.5社区版服务器。
问题是MySQL服务器不允许连接到它,除非我们手动添加每个用户。添加200多个用户是一项繁琐的工作,并且用户数量每天都在增加。是否有任何解决方案,以便我可以使我的MySQL服务器作为多用户,而无需手动添加每个用户。
提前感谢
您可以在旧数据库上创建退出用户的脚本:
选择
CONCAT_WS(' ',' 创建用户',' ''' ,用户,' ''',' 由密码'标识,' ''',密码,' '' ;')
来自 mysql。 user
比在新数据库上运行该脚本...
http://dev.mysql.com/doc/refman/5.1/en/create- user.html [ ^ ]
hello
i am having two remote MySQL database servers ,one with 5.5 community edition and win2012 server OS on storage server and another with 5.1 community edition and winxp os on a p4 machine. for the both i have around 200+ users accessing data through winform applications.
now we are planning to upgrade our server on p4 machine and bought a higher end machine with win7,xeon processor configuration and we installed MySQL 5.5 community edition server.
the problem is MySQL server is not allowing to connect to it unless we manually add each user. adding 200+ users is tedious job and the no of users are increasing every day. is there any solution for this so that i can make my MySQL server as multiuser without adding each user manually.
thanks in advance
You can create a script of exiting user on the old DB:
select CONCAT_WS(' ', 'create user', '''', User, '''', 'identified by password', '''', Password, ''';') from mysql.user
Than run that script on the new DB...
http://dev.mysql.com/doc/refman/5.1/en/create-user.html[^]
这篇关于如何将Mysql数据库作为多用户服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!