phpmyadmin管理用户手册
phpmyadmin建立数据库、用户基本教程

1.打开PHPmyadmin
2.输入MYSQL的用户名和密码登陆。
3.输入要创建的数据库名,点击创建。
4.创建好后要给数据库分配单独的权限比较小的用户访问数据库(为了数据安全,建议不要用root
或是管理员权限的用户连接数据库)。
首先返回PHPmyadmin的管理首页。
点击”权限”
5.点击”添加新用户”,创建访问数据库的用户。
6.输入要创建的用户名和密码,“全局权限”不用理它,什么都不选,然后拉到底下点击“执行”按
钮,此时建立的用户是没有一点权限的。
7.点击主目录按钮返回管理界面首页
8.在管理首页页面上再点击“权限”进入用户管理界面,然后选择刚才创建的用户,点击后面的“编
辑权限”按钮,进一步为这个用户分配权限。
9.在数据库指定权限下面的“在下列数据库添加权限”中找到并选中数据库为其指定权限,如选中
刚建立好的数据库“testname”,
10.然后会展开并进入这个用户所能访问的数据库的权限配置页面,里面有很多的设置。
11.在按数据库指定权限这里选择上你要给这个用户访问这个数据库的权限,如果你不懂的话就全选,
然后点“执行”。
这样就给相应的数据库分配好了用户访问权限。
PhpMyAdmin基本操作(V1.0)

PhpMyAdmin基本操作(V1.0)一、使用PhpMyAdmin创建数据库及为数据库添加管理帐户:1、新建数据库:①建立一个名为“data_test”的数据库,在文本框中输入“data_test”然后点击“创建”即可:②创建成功则显示如下:2、为新建立数据库添加管理帐户:新创建好的数据库为空数据库,没有任何数据表,也没有任何独立用户拥有对它的操作权限(root用户除外),下面我们来为“data_test”数据库增加用户和相应的权限:①在Phpmyadmin登陆后的界面左边的数据库列表中选中“data_test”进入该数据库,点击上方的“权限”按钮,会出现权限列表页面,此页面中会列出所有能够对该数据库进行操作的用户及相应的权限,如下图:②点击左下角“添加新用户”(如上图红圈区域),进入用户创建界面。
在这里,我们可以给数据库用户设定用户名、密码和权限:注意上图中红圈部分,在创建用户时,默认会选中“授予数据库’data_test’的所有权限”;主机设置为本地(localhost),设置好后,点击右下角的“执行”按钮。
③创建成功则显示如下:3、新建帐户并为其分配数据库:①新建帐户:点击MySql主界面上方“权限”链接,进入“查看用户界面”,在此界面点击“添加新用户”新建数据库帐户,方法与上相同,不再复述:②分配数据库及提升相应权限:建立成功后,单击新建帐户右边操作按钮,进入权限编辑页面,在下方“按数据库指定权限”框中,选择刚才建立的“data_test”③进入到权限编辑页面,添加用户的数据操作权限与结构操作权限:二、使用PhpMyAdmin导入和导出数据库:刚刚创建的“data_test”为新数据库,里面没有任何数据信息。
下面我们来试着为它导入一些数据。
一般可以使用.sql文件进行导入。
1、数据导入:①选中“data_test”数据库,点击“导入”,进入导入数据页面。
在此页面中可以选择要导入的文件,并设置文件的字符集。
phpmyadmin教程(免费教程)说明书

Table of ContentsAbout1 Chapter 1: Getting started with phpmyadmin2 Remarks2 Versions2 Examples3 Installation or Setup3 How to create a database and grant privileges for database user.10 Credits14AboutYou can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: phpmyadminIt is an unofficial and free phpmyadmin ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official phpmyadmin.The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to ********************Chapter 1: Getting started with phpmyadmin RemarksphpMyAdmin is a free software used to manage MySQL databases via web interface. It is much easier than using MySQL console where the user must use commands to manage databases. By using phpMyAdmin, with a few mouse clicks people can create database and grant privileges for MySQL user for that database.Official documentationWikiVersionsExamplesInstallation or SetupDescription:phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.Note 1: Many operating systems already include a phpMyAdmin package and will automatically keep it updated, however these versions are sometimes slightly outdated and therefore may be missing the latest features.Note 2: These method assumes that you have already setup a local web server with MySQL. Windows:Third Party Products:•The easiest way to get phpMyAdmin on Windows is using third party products which include phpMyAdmin together with a database and web server such as XAMPP(cross-platform).•List of Cross-Platform third party products:XAMPP, AMPPS, Zend Server Community EditionList of Windows Specific third party products:WampServer, EasyPHP Devserver, •Uniform Server, Bitnami WAMP Stack, WPN-XM Server Stack, WTServer, UwAmp, Vertrigo•Manual Installation :You can select any kit from given phpmyadmin kits.Example:For all languages choose some thing like phpMyAdmin-4.6.4-all-languages.7z or forlanguage specific choose something like phpMyAdmin-4.6.4-english.7zAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder tophpMyAdmin it's easy to reference. Copy the extracted folder to your local web server'sdocument root. Depending on how you have configured your web server, this could be the www, htdocs, html, or public_html folder. If you are using IIS, open IIS Manager. In the left navigation tree, right-click on "Default Web Site" and select "Explore". Copy and paste the extracted phpMyAdmin folder into the location that opens.Linux distributionsNote: phpMyAdmin is included in most Linux distributions. It is recommended to use distribution packages when possible. They usually provide integration to your distribution and you will automatically get security updates from your distribution.•Third Party Products:XAMPP, TurnKey Linux LAMP stack, Bitnami LAMPStack,•Manual Installation::You can select any kit from given phpmyadmin kits.Example:For all languages choose some thing like phpMyAdmin-4.6.4-all-languages.7z or for language specific choose something like phpMyAdmin-4.6.4-english.7zAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder to phpMyAdmin it's easy to reference. Copy the extracted folder to your local web server's document root. Depending on how you have configured your web server, this could be the htdocs or public_html folder.Debian:•Debian’s package repositories include a phpMyAdmin package, but be aware that theconfiguration file is maintained in /etc/phpmyadmin and may differ in some ways from the official phpMyAdmin documentation. Specifically it does:1.Configuration of web server (works for Apache and lighttpd).2.Creating of phpMyAdmin configuration storage using dbconfig-common.Securing setup script, see Setup script on Debian, Ubuntu and derivatives.3.•Terminal: The easiest way to install phpmyadmin in Debian is through apt-getsudo apt-get install phpmyadminDuring the installation, phpMyAdmin will walk you through a basic configuration. After the process starts follow these steps:1.Select Apache2 for the serverChoose YES when asked about whether to Configure the database for phpmyadmin with2.dbconfig-common3.Enter your MySQL password when promptedEnter the password that you want to use to log into phpmyadmin4.After the installation has completed, add phpmyadmin to the apache configuration.sudo nano /etc/apache2/apache2.confAdd the phpmyadmin config to the file.Include /etc/phpmyadmin/apache.confRestart apache:sudo service apache2 restartYou can then access phpmyadmin by going to your-ip-address/phpmyadmin.Security:Unfortunately, older versions of phpMyAdmin have had serious security vulnerabilities, including allowing remote users to eventually exploit root on the underlying virtual private server. One can prevent a majority of these attacks through a simple process: locking down the entire directory with Apache's native user/password restrictions which will prevent these remote users from even attempting to exploit older versions of phpMyAdmin.Set Up the .htaccess File:To set this up, start off by allowing the .htaccess file to work within the phpmyadmin directory. You can accomplish this in the phpmyadmin configuration file:sudo nano /etc/phpmyadmin/apache.confUnder the directory section, add the line “AllowOverride All” under “Directory Index”, making the section look like this:<Directory /usr/share/phpmyadmin>Options FollowSymLinksDirectoryIndex index.phpAllowOverride All[...]Configure the .htaccess fileWith the .htaccess file allowed, we can proceed to set up a native user whose login would be required to even access the phpmyadmin login page.Start by creating the .htaccess page in the phpmyadmin directory:sudo nano /usr/share/phpmyadmin/.htaccessFollow up by setting up the user authorization within .htaccess file. Copy and paste the following text inAuthType BasicAuthName "Restricted Files"AuthUserFile /path/to/passwords/.htpasswdRequire valid-userAuthType: This refers to the type of authentication that will be used to the check the passwords. The passwords are checked via HTTP and the keyword Basic should not be changed.AuthName: This is text that will be displayed at the password prompt. You can put anything here. AuthUserFile: This line designates the server path to the password file (which we will create in the next step.) Require valid-user: This line tells the .htaccess file that only users defined in the password file can access the phpMyAdmin login screen.Create the htpasswd file:Now we will go ahead and create the valid user information.Start by creating a htpasswd file. Use the htpasswd command, and place the file in a directory of your choice as long as it is not accessible from a browser. Although you can name the password file whatever you prefer, the convention is to name it .htpasswd.sudo htpasswd -c /path/to/passwords/.htpasswd usernameA prompt will ask you to provide and confirm your password.Once the username and passwords pair are saved you can see that the password is encrypted inthe file.Finish up by restarting apache:sudo service apache2 restartAccessing phpMyAdmin:phpMyAdmin will now be much more secure since only authorized users will be able to reach the login page.Fill it in with the username and password that you generated. After you login you can access phpmyadmin with the MySQL username and password.•Ubuntu:To get started, we can simply install phpMyAdmin from the default Ubuntu repositories.We can do this by updating our local package index and then using the apt packaging system to pull down the files and install them on our system:sudo apt-get updatesudo apt-get install phpmyadminWarning:When the first prompt appears, apache2 is highlighted, but not selected. If you do nothit "SPACE" to select Apache, the installer will not move the necessary files duringinstallation. Hit "SPACE", "TAB", and then "ENTER" to select Apache.1.For the server selection, choose apache2.2.Select yes when asked whether to use dbconfig-common to set up the database3.You will be prompted for your database administrator's passwordYou will then be asked to choose and confirm a password for the phpMyAdmin application4.itselfThe installation process actually adds the phpMyAdmin Apache configuration file into the/etc/apache2/conf-enabled/ directory, where it is automatically read.The only thing we need to do is explicitly enable the php5-mcrypt extension, which we can do by typing:sudo php5enmod mcryptAfterwards, you'll need to restart Apache for your changes to be recognized:sudo service apache2 restartYou can then access phpmyadmin by going to your-ip-address/phpmyadmin.•Fedora:Fedora ships the phpMyAdmin package, but be aware that the configuration file is maintained in /etc/phpMyAdmin/ and may differ in some ways from the official phpMyAdmin documentation. Terminal:First, you’ll follow a simple best practice: ensuring the list of available packages is up to date before installing anything new.dnf -y updateThen it’s a matter of just running one command for installation via apt-get:dnf -y install phpmyadminSecurity:To secure phpMyAdmin we should lock down access to a specific IP address.When the phpMyAdmin package is installed, an Apache Virtual Host file is added to configure web access. Let’s edit that file:vim /etc/httpd/conf.d/phpMyAdmin.confBy default, the configuration for phpMyAdmin only allows access from the server on which it is installed.Change each IP address to the one you found in what is my ip address? or another IP address that will be connecting to phpMyAdmin remotely:Require ip 127.0.0.1Allow from 127.0.0.1Require ip 127.0.0.1Allow from 127.0.0.1Restart Apache:systemctl restart httpdVerify that phpMyAdmin is working by visiting http://the_IP_of_your_server/phpmyadmin For example: http://1.2.3.4/phpmyadminComposer:•You can install phpMyAdmin using Composer, however it’s currently not available in the defaultPackagist repository due to its technical limitations.The installation is possible by adding our own repositoryhttps:///packages.json:composer create-project phpmyadmin/phpmyadmin --repository-url=https:///packages.json --no-dev•Installing from Git:You can clone current phpMyAdmin source from https:///phpmyadmin/phpmyadmin.git: git clone https:///phpmyadmin/phpmyadmin.gitAdditionally you need to install dependencies using Composer:composer updateIf you do not intend to develop, you can skip installation of developer tools by invoking:composer update --no-devMac:•Third Party Products : MAMP, AMPPS, Bitnami MAMPStack, XAMPP•Manually:Download phpMyAdmin , For all languages choose something like phpMyAdmin-4.6.4-all-languages.tar.bz2 or for language specific choose something like phpMyAdmin-4.6.4-english.tar.gzAfter Choosing a phpmyadmin kit extract the folder. Rename the extracted folder to phpMyAdmin it's easy to reference. Copy the extracted folder to your local web server's document root. Depending on how you have configured your web server, this could be the htdocs or public_html folder.Make the config foldermkdir ~/Sites/phpmyadmin/configChange the permissionschmod o+w ~/Sites/phpmyadmin/configRun the set up in the browserhttp://localhost/~username/phpmyadmin/setup/ or http://localhost/phpmyadmin/setup/You need to create a new localhost mysql server connection, click new server.Switch to the Authentication tab and set the local mysql root user and the password. Add in the username “root” (maybe already populated, add in the password that you set up earlier for the MySQL root user set up, click on save and you are returned to the previous screen. (This is not the OSX Admin or root password – it is the MySQL root user).Make sure you click on save, then a config.inc.php is now in the /config directory of phpmyadmin directory, move this file to the root level of /phpmyadmin and then remove the now empty /config directory.Now going to http://localhost/~username/phpmyadmin/ will now allow you to interact with your MySQL databases.Note: Change localhost with your-ip-addressHow to create a database and grant privileges for database user.1.Navigate to phpMyAdmin by URL http://your_ip/phpmyadmin or http://localhost/phpmyadmin2.Login using username root and root password.3.Click on Databases tab.Enter database name, select collation (you may leave it to default) and click create.4.Click on Privileges tab and select "Add user account".5.6.You can select localhost if the connection is made only form local. Select "any host" if you are planing to connect from different hosts.7.Enter new username and password.Select the privileges you need for that user.8.9.Click on Database tab and select the database for which you need to give access(in our case the newly created database in step 4). Click Go.Read Getting started with phpmyadmin online:https:///phpmyadmin/topic/5577/getting-started-with-phpmyadminCredits。
phpMyAdmin教程

phpMyAdmin教程#1 phpMyAdmin教程先下载一份最新版的phpMyAdmin MYSQL管理器。
解压后得到一个phpMyAdmin的目录(你可以改名)找到目录里的config.inc.php文件,打开找到$cfg['PmaAbsoluteUri']修改你将上传到空间的phpMyAdmin的网址如:$cfg['PmaAbsoluteUri'] = '/phpmyadmin/';还有下面的$cfg['Servers'][$i]['host'] = 'localhost';(通常用默认,也有例外)$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? 在自己的机子里调试用config,如果在网上用cookie。
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user(用户名,自己机里用root,在网上设你的ftp 用户名)$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed自己机里不用设$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only(你只有一个数据就设置一下)还有设$cfg['DefaultLang'] = 'zh';设置完毕可以上传到网上了。
phpmyadmin新建表格

竭诚为您提供优质文档/双击可除phpmyadmin新建表格篇一:phpmyadmin_的详细使用教程,phpmyadmin创建数据库,创建用户详细图解教程phpmyadmin的详细使用教程,phpmyadmin创建数据库,创建用户图解教程一、设置数据库用户权限安装好以后,打开phpmyadmin的首页,点击“权限”,如下图所示:点击“添加新用户”,如下图所示:现在按照要求填写,勾选权限,最后点击右下角的“执行”,如下图所示:下面对这些权限进行详细的描述:1、数据部分1.select:是指允许读取数据2.inseRt:是指允许插入和替换数据3.update:是指允许更改数据4.delete:是指允许删除数据5.File:是指允许从数据中导入数据,以及允许将数据导出至文件2、结构部分1.cteate:允许创建新的数据库和表2.alteR:允许修改现有表的结构3.index:允许创建和删除索引4.dRop:允许删除数据库和表5.cReatetempoRaRytables:允许创建暂时表6.cReateView:允许创建新的视图7.showView:允许查询试图8.cReateRoutine:允许创建新的存储过程9.alteRRoutine:允许修改存储过程10.execute:允许执行查询在“权限”页面里点击最右边的“编辑权限的图标”,然后可以修改此用户的各种权限,如下图所示:修改完用户权限以后,需要回到phpmyadmin的首页,重新加载一下授权,如下图所示:二、检查和修改数据库需要检查和修改数据库时,打开phpmyadmin的首页,左边的侧边栏里显示着服务器上的各个数据库,点击就可以进入,也可以点击“数据库”图标,如下图所示:进入数据库以后,现在左边的侧边栏里显示着数据库的各个表,点击就可以篇二:phpmyadmin管理用户手册phpmyadmin图文使用指南1phpmyadmin简介phpmyadmin是使用php编写的,以网页方式管理mysql 数据库的一个开源管理工具。
phpMyAdmin配置图文教程

phpMyAdmin配置图文教程一、下载先到互联网上下载 phpMyAdmin,也可以到 phpMyAdmin 官方网站下载,地址为:/soft/2799.html再解压到 web 可以访问的目录下,如果是虚拟空间,可以解压后通过 ftp 工具上传到 web 目录下,同时您可以修改解压后该文件的名称。
二、配置打开 libraries 目录下的 config.default.php 文件,依次找到下面各项,按照说明配置即可。
1、访问网址2、 MySQL 主机信息填写 localhost 或 MySQL 所在服务器的 ip 地址,如果 MySQL 和该 phpMyAdmin 在同一服务器,则按默认 localhostMySQL 端口,默认为 3306,保留为空即可,如果您安装 MySQL 时使用了其它的端口,需要在这里填写。
3、 MySQL 用户名和密码4、认证方法在此有四种模式可供选择,cookie,http,HTTP,config; config 方式即输入 phpMyAdmin 的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
当该项设置为 cookie,http 或 HTTP 时,登录 phpMyAdmin 需要数据用户名和密码进行验证,具体如下:PHP 安装模式为 Apache,可以使用 http 和 cookie;PHP 安装模式为 CGI,可以使用 cookie。
5、短语密码(blowfish_secret)的设置6、修改界面语言修改此属性为zh[简体中文]7、测试PhpMyAdminphpMyAdmin配置安装全攻略核心提示:phpMyAdmin配置安装全攻略phpMyAdmin安装配置教程傻瓜版,主要为phpMyAdmin 2.11.X 配置安装,其它版本安装方法一样。
phpMyAdmin配置安装全攻略phpMyAdmin安装配置教程傻瓜版,主要为phpMyAdmin 2.11.X 配置安装,其它版本安装方法一样。
使用phpmyadmin管理mysql数据库

phpmyadmin管理mysql第一讲:如何登陆phpmyadmin不管是本机测试,服务器维护,还是虚拟主机用户管理mysql,我们都经常要用到phpmyadmin这个在线软件来管理mysql。
登陆地址:本机或者服务器用户:一般默认的地址是: ip:端口虚拟主机用户请咨询您的服务器提供商服务器用户为了使用方便,可以给自己的phpmyadmin绑定一个域名。
打开首页后,我们看到如下界面,这时我们必须使用拥有创建数据库权限的账号登陆才能进行下面的操作,一般顶级的管理员账号默认为root账号。
使用账户和密码输入后,点击“执行”这样就可以登录了。
这里说明下,在phpmyadmin管理中,没有“确认”这个按钮,一般都是使用“执行”按钮,其实意思是一样的。
以phpMyAdmin - 2.11.9.5为例,会看到以下页面第二讲:熟悉phpmyadmin页面左上角5个按钮的前2个是非常常用的按钮,一定要记得。
第一个是返回到主页的意思。
第二个是退出登录的意思。
第三个高级用户常用,是直接执行sql语句。
第四个第五个分别是phpmyadmin和mysql的帮助文档。
第三讲:使用phpmyadmin创建数据库用户名phpmyadmin管理mysql第三讲:使用phpmyadmin创建新用户在前面的课程中,我们熟悉了页面。
下面我们进入第一个实际应用,创建一个新用户,这个功能非常实用,为什么这么说呢?在服务器或者虚拟主机管理上,每个网站都会创建一个唯一专属使用的数据库用户名,这个是为了安全和管理的需要。
在我们登陆到phpmyadmin首页后,不在首页的,请点首页恢复到首页页面哦。
点击右边下部分的“权限”点击后会出现当前的mysql已经存在的会员账号列表。
点击添加新用户进入用户创建过程第四讲:使用phpmyadmin创建数据库名phpmyadmin管理mysql第四讲:使用phpmyadmin创建数据库名在页面的首页右边栏目中部或者点击数据库按钮链接进去后,都可以找到这个部分内容。
附录C phpMyAdmin基本操作_MySQL数据库教程_[共10页]
![附录C phpMyAdmin基本操作_MySQL数据库教程_[共10页]](https://img.taocdn.com/s3/m/b39806d952ea551811a68758.png)
279附录CphpMyAdmin 基本操作phpMyAdmin 是一个用PHP 编写的软件工具,可以通过Web 方式控制和操作MySQL 数据库。
通过phpMyAdmin 可以完全对数据库进行操作,例如建立、复制和删除数据等,对MySQL 数据库的管理变得相当简单。
C.1 安装phpMyAdmin 环境phpMyAdmin 是基于PHP 的Web 客户端软件,在使用之前必须首先搭好PHP 的运行环境,包括安装Apache 服务器和PHP 插件。
(1)安装Apache 服务器Apache 是开源软件,用户可以在其官方网站上免费下载。
适用于Windows 的Apache 分为安装版和免安装版,安装版又分为openssl 和no ssl 两个版本,为初学者方便,本书选用的是openssl 安装版。
下载得到安装包,双击启动安装向导,在服务器信息页填入如下信息:Network Domain: localhostServer Name: localhostAdminstrator’s Email Address: easybooks@安装过程的其余步骤都取它的默认设置,按向导提示操作即可。
Apache 安装成功后在屏幕右下角会出现一个图标,图标内的三角形为绿色时表示服务正在运行,红色表示服务停止。
双击该图标会弹出Apache 管理界面。
单击【Start 】、【Stop 】和【Restart 】按钮分别表示开始、停止和重启Apache 服务。
Apache 安装完后可以测试一下看能否运行。
在IE 地址栏中输入http://localhost 或http://127.0.0.1后按“Enter ”键。
如果测试成功会出现“It works !”页面。
(2)安装PHP 插件Apache 安装完成后,只支持HTML 和JavaScript 等语言,要想其支持PHP ,还需要为其安装PHP 插件。
目前的PHP 也提供了软件安装版,本书将采用这个版本。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
phpMyAdmin图文使用指南
1PhpMyAdmin简介
phpMyAdmin是使用PHP 编写的,以网页方式管理MySQL 数据库的一个开源管理工具。
使用
phpMyAdmin可以在网页中方便的输入SQL 语句,尤其是要处理大量数据的导入和导出时更为方便。
其中一个更大的优势在于由于phpMyaAdmin跟其他PHP 页面一样在网页服务器上执行,可以远程管理MySQL 数据库,方便的建立、修改、删除数据库和表。
2WampServer简介
Wamp5是Apache+PHP+Mysql集成环境,拥有简单的图形和菜单安装和配置环境。
该版本集成了Apache 2.2.8、MySQL 5.0.51b、PHP 5.2.6 满了大部分PHPer的需求
2.1页面预览
安装完成后,在电脑桌面的右下角会有一个扇形的图标,如下图所示:
2.2语言设置
该工具是英文页面的,可以通过右键单击属性,选择简体中文,如下图所示:
3登录PhpMyAdmin
3.1通过WampServer登录
●phpMyAdmin非常简单,直接通过WampServer登录即可,如下图所示:
●登陆后可以看到如下图所示的页面:
3.2权限设置
3.2.1 登录phpMyAdimin后
点击【权限】进入phpMyAdmin的用户权限管理页面,如下图所示:
3.2.1 添加新用户
创建一个用户名和密码为test的新用户,并选择,创建一个与用户名同名的数据库
用户名:选择使用文本域来输入新的用户名
主机:如果是本机使用,可以填写localhost,如果是其他机器,可以填写其他机器的IP 地址,一般默认为任意主机。
密码:在填写密码的时候,如果不需要密码可以选择无密码,如果需要请选择使用文本域。
用户信息填写完成之后,点击【执行】按钮,创建test用户成功,同时创建了一个与用户名同名的数据库。
3.3重新载入权限
新用户创建完成后,需要点击页面下方的重新载入权限,或回到phpMyAdmin首页,来更新phpMyAdmin配置,如下图所示:
3.4Mantis数据库的创建
●将mantis的压缩包解压到WWW文件目录下
●在浏览器中输入http://localhost/mantis,出现如下的安装画面,如下图所示:
在创建Mantis的Bug库的时候,一般默认都会是bugtracker,对于所有的用户名和密码都必须要系统中存在的,其他用户名和密码都存储在phpMyAdmin的名字为MySql的数据库中user表中,如下图所示:
对于Mantis创建的用户名和密码,都存放在bugtracker这个数据库的user表中,如下图所示:
3.5修改密码
3.5.1 修改密码
●在更改密码的密码文本框中输入新密码,点击【执行】按钮即可完成修改密码的操作
●图中的root@127.0.0.1和root@localhost,这两个目前都没有密码,我们都要修改一下;
●点右边“编辑权限”的小图标进入修改,把root@127.0.0.1的密码改为“123”,root@localhost的
密码改为“456”;
3.5.2 更新phpMyAdmin配置
●当root@localhost的密码被修改之后,phpMyAdmin可能出现页面错误,告诉你数据库无法访问
了,这是正常的,因为密码刚被你改了,所以你要修改一下phpMyAdmin的数据库访问密码;
●登录到phpMyAdmin可能会有如下图片所示的提示:
●更新phpMyAdmin的数据库访问密码方法如下:
选择重新载入phpMyAdmin;
打开文件“.\wamp\apps\phpmyadmin3.3.9\config.inc.php”,其中“.\wamp”是我的
WampServer的安装路径,最好用UltraEdit等工具来打开,因为文本文件的格式是Unix的格式,
如果直接用记事本来打开的话换行会显示不正常。
把“密码”改一下:
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '456';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
配置文件预览
截图预览
密码错误的时候系统会进行如下提示:
4数据库操作
4.1登录数据库
●打开phpMyAdmin的首页,左边的侧边栏里显示着服务器上的各个数据库,点击就可以进入,
如下图所示:
●进入数据库以后,现在左边的侧边栏里显示着数据库的各个表,如下图所示:
选中某一个表,点击右侧的可以直接进入该表,看到该表格的具体结构,同时在页面上方也会显示出当前页面的基本信息,属于哪一个数据库,哪一个表,在哪一个服务器上,如下图所示:
4.2创建新数据库
●输入要创建的数据库名称
●创建完成后,会显示在页面左侧的数据库列表中
●同时会显示该数据库中一共创建了多少表,如下图所示:修复数据库
●数据表损坏时,可以通过phpMyAdmin进行修复。
●登录phpMyAdmin,进入需要修复的数据库页面,选择一个数据表前的方框,如下图所示:
●页面下方选中项下拉选择修复表,如下图所示:
4.3恢复数据库
●导出备份数据库登录phpMyAdmin,点击右边的导出
●执行导出操作
●导出后的PDF结果预览如下所示:
●导出后的sql结果预览如下所示:
4.4备份数据库
●登录phpMyAdmin,点击右边的import,选择存放在本地的需要导入的文件,通常都是sql语句文件信息;
●执行导入操作,导入成功。