MYSQL添加新用户和数据库(命令行模式和phpmyadmin)
- font size decrease font size increase font size
- Print Email
MYSQL添加新用户和数据库(命令行模式和phpmyadmin)
一、命令行模式
首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。
注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。
用户:phplamp
用户数据库:phplampDB
1.新建用户
//登录MYSQL
@>mysql -u root -p
@>密码
//创建用户
mysql> insert into mysql.user(Host,User,Password) values('localhost','phplamp',password('1234'));
//刷新系统权限表
mysql>flush privileges;
这样就创建了一个名为:phplamp 密码为:1234 的用户。
//退出后登录一下
mysql>exit;
@>mysql -u phplamp -p
@>输入密码
mysql>登录成功
2.为用户授权
//登录MYSQL(有ROOT权限)。我里我以ROOT身份登录.
@>mysql -u root -p
@>密码
//首先为用户创建一个数据库(phplampDB)
mysql>create database phplampDB;
//授权phplamp用户拥有phplamp数据库的所有权限
@>grant all privileges on phplampDB.* to [email protected] identified by '1234';
//刷新系统权限表
mysql>flush privileges;
mysql>其它操作
//如果想指定部分权限给一用户,可以这样来写:
mysql>grant select,update on phplampDB.* to [email protected] identified by '1234';
//刷新系统权限表。
mysql>flush privileges;
mysql> grant 权限1,权限2,…权限n on 数据库名称.表名称 to 用户名@用户地址 identified by ‘连接口令’;
权限1,权限2,…权限n代表select,insert,update,delete,create,drop,index,alter,grant,references,reload,shutdown,process,file等14个权限。
当权限1,权限2,…权限n被all privileges或者all代替,表示赋予用户全部权限。
当数据库名称.表名称被*.*代替,表示赋予用户操作服务器上所有数据库所有表的权限。
用户地址可以是localhost,也可以是ip地址、机器名字、域名。也可以用’%'表示从任何地址连接。
‘连接口令’不能为空,否则创建失败。
例如:
mysql>grant select,insert,update,delete,create,drop on vtdc.employee to This email address is being protected from spambots. You need JavaScript enabled to view it. identified by ‘123′;
给来自10.163.225.87的用户joe分配可对数据库vtdc的employee表进行select,insert,update,delete,create,drop等操作的权限,并设定口令为123。
mysql>grant all privileges on vtdc.* to This email address is being protected from spambots. You need JavaScript enabled to view it. identified by ‘123′;
给来自10.163.225.87的用户joe分配可对数据库vtdc所有表进行所有操作的权限,并设定口令为123。
mysql>grant all privileges on *.* to This email address is being protected from spambots. You need JavaScript enabled to view it. identified by ‘123′;
给来自10.163.225.87的用户joe分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123。
mysql>grant all privileges on *.* to [email protected] identified by ‘123′;
给本机用户joe分配可对所有数据库的所有表进行所有操作的权限,并设定口令为123。
3.删除用户
@>mysql -u root -p
@>密码
mysql>DELETE FROM user WHERE User="phplamp" and Host="localhost";
mysql>flush privileges;
//删除用户的数据库
mysql>drop database phplampDB;
4.修改指定用户密码
@>mysql -u root -p
@>密码
mysql>update mysql.user set password=password('新密码') where User="phplamp" and Host="localhost";
mysql>flush privileges;
mysql>quit;
二、利用phpmyadmin
1、成功登陆后的首页里填入新建的数据库名"sqlname",点击“创建”来新建数据库(如果创建不能成功,说明你没有管理权限)
2、然后点击左边工具栏上部的“主目录”,然后点击右边栏里的“权限”
3、然后点击右边栏里的“添加新用户”
4、输入数据库用户名username、主机、密码后,点击下部的“执行”(除非你添加的是管理员,否则无需设置下面的“全局权限”)。
5、然后在“按数据库指定权限”的下拉框中找到刚才添加的数据库"sqlname",选定后自动跳转到下一页面。
6、在“按数据库指定权限”里全部点选,点击“执行”确定。
7、下一页面上部出现了“您已经更新了'username'@'localhost'的权限”时,说明操作成功。
( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0004 | 406752 | {main}( ) | .../index.php:0 |
2 | 0.0533 | 4928928 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0533 | 4928928 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.1896 | 13312040 | Joomla\CMS\Application\SiteApplication->dispatch( $component = ??? ) | .../SiteApplication.php:233 |
5 | 0.1900 | 13336904 | Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_k2', $params = ??? ) | .../SiteApplication.php:194 |
6 | 0.1905 | 13392256 | Joomla\CMS\Component\ComponentHelper::executeComponent( $path = '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:377 |
7 | 0.1906 | 13423736 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php ) | .../ComponentHelper.php:402 |
8 | 0.1962 | 13829200 | K2ControllerItem->execute( $task = '' ) | .../k2.php:64 |
9 | 0.1962 | 13829200 | K2ControllerItem->display( $cachable = ???, $urlparams = ??? ) | .../BaseController.php:710 |
10 | 0.2026 | 14685728 | K2ControllerItem->display( $cachable = TRUE, $urlparams = ['id' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ) | .../item.php:78 |
11 | 0.2026 | 14685728 | K2ControllerItem->display( $cachable = TRUE, $urlparams = ['id' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ) | .../controller.php:19 |
12 | 0.2055 | 15144728 | Joomla\CMS\Cache\Controller\ViewController->get( $view = class K2ViewItem { public $document = class Joomla\CMS\Document\HtmlDocument { public $_links = [...]; public $_custom = [...]; public $template = NULL; public $baseurl = NULL; public $params = NULL; public $_file = NULL; protected $_template = ''; protected $_template_tags = [...]; protected $_caching = NULL; private $_html5 = NULL; public $title = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $description = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin) 一、命令行模式 首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。用户:phplamp用户数据库:phplampDB 1.新建用...'; public $link = ''; public $base = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $language = 'en-gb'; public $direction = 'ltr'; public $_generator = 'Joomla! - Open Source Content Management'; public $_mdate = ''; public $_tab = '\t'; public $_lineEnd = '\n'; public $_charset = 'utf-8'; public $_mime = 'text/html'; public $_namespace = ''; public $_profile = ''; public $_scripts = [...]; public $_script = [...]; protected $scriptOptions = [...]; public $_styleSheets = [...]; public $_style = [...]; public $_metaTags = [...]; public $_engine = NULL; public $_type = 'html'; protected $mediaVersion = '15dbf078d61dbbf76811992dd0143dd9' }; protected $_name = 'item'; protected $_models = ['itemlist' => class K2ModelItemlist { ... }, 'item' => class K2ModelItem { ... }]; protected $_basePath = '/var/www/vhosts/shan.info/httpdocs/components/com_k2'; protected $_defaultModel = 'item'; protected $_layout = 'item'; protected $_layoutExt = 'php'; protected $_layoutTemplate = '_'; protected $_path = ['template' => [...], 'helper' => [...]]; protected $_template = '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php'; protected $_output = NULL; protected $_escape = 'htmlspecialchars'; protected $_charset = 'UTF-8'; protected $_errors = []; public $baseurl = ''; public $addLink = NULL; public $inlineCommentsModeration = FALSE; public $item = class stdClass { public $id = '123'; public $title = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $alias = 'mysql添加新用户和数据库(命令行模式和phpmyadmin)'; public $catid = '38'; public $published = '1'; public $introtext = '<div id="msgcns!750E812099FE2A7!196" class="bvMsg">\r\n<p>MYSQL添加新用户和数据库(命令行模式和phpmyadmin)</p>\r\n<p>一、命令行模式</p>\r\n<p>首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。<br />注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。<br />用户:phplamp<br />用户数据库:phplampDB</p>\r\n<p>1.新建用户</p>\r\n<p>//登录MYSQL<br />@>mysql -u root -p<br />@>密码<br />//创'; public $fulltext = ''; public $video = NULL; public $gallery = NULL; public $extra_fields = NULL; public $extra_fields_search = ''; public $created = '2010-07-21 20:40:07'; public $created_by = '63'; public $created_by_alias = ''; public $checked_out = '0'; public $checked_out_time = '0000-00-00 00:00:00'; public $modified = '2013-01-05 12:22:38'; public $modified_by = '63'; public $publish_up = '2010-07-21 20:39:52'; public $publish_down = '0000-00-00 00:00:00'; public $trash = '0'; public $access = '1'; public $ordering = '9'; public $featured = '0'; public $featured_ordering = '0'; public $image_caption = ''; public $image_credits = ''; public $video_caption = ''; public $video_credits = ''; public $hits = '3546'; public $params = class Joomla\Registry\Registry { ... }; public $metadesc = ''; public $metadata = 'robots=\nauthor='; public $metakey = ''; public $plugins = ''; public $language = '*'; public $category = class TableK2Category { ... }; public $link = '/item/123-mysql添加新用户和数据库(命令行模式和phpmyadmin).html'; public $printLink = '/item/123-mysql添加新用户和数据库(命令行模式和phpmyadmin).html?tmpl=component&print=1'; public $tags = [...]; public $imageXSmall = ''; public $imageSmall = ''; public $imageMedium = ''; public $imageLarge = ''; public $imageXLarge = ''; public $attachments = [...]; public $rawTitle = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $author = class Joomla\CMS\User\User { ... }; public $videoType = 'allvideos'; public $text = '<div id="msgcns!750E812099FE2A7!196" class="bvMsg">\r\n<p>MYSQL添加新用户和数据库(命令行模式和phpmyadmin)</p>\r\n<p>一、命令行模式</p>\r\n<p>首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。<br />注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。<br />用户:phplamp<br />用户数据库:phplampDB</p>\r\n<p>1.新建用户</p>\r\n<p>//登录MYSQL<br />@>mysql -u root -p<br />@>密码<br />//创'; public $event = class stdClass { ... }; public $jcfields = [...]; public $image = ''; public $imageWidth = '600'; public $comments = [...]; public $numOfComments = 0; public $nextLink = '/item/122-安装rpmforge-yum源.html'; public $nextTitle = '安装rpmforge yum源'; public $nextImageXSmall = ''; public $nextImageSmall = ''; public $nextImageMedium = ''; public $nextImageLarge = ''; public $nextImageXLarge = ''; public $previousLink = '/item/125-setup-subversion-client-programs.html'; public $previousTitle = 'Setup subversion client programs'; public $previousImageXSmall = ''; public $previousImageSmall = ''; public $previousImageMedium = ''; public $previousImageLarge = ''; public $previousImageXLarge = ''; public $absoluteURL = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $langTagForFB = 'en_GB'; public $langTagForTW = 'en-gb'; public $langTagForLI = 'en_GB'; public $sharinglink = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $socialLink = 'https%3A%2F%2Fwww.shan.info%2Fitem%2F123-mysql%25E6%25B7%25BB%25E5%258A%25A0%25E6%2596%25B0%25E7%2594%25A8%25E6%2588%25B7%25E5%2592%258C%25E6%2595%25B0%25E6%258D%25AE%25E5%25BA%2593%25EF%25BC%2588%25E5%2591%25BD%25E4%25BB%25A4%25E8%25A1%258C%25E6%25A8%25A1%25E5%25BC%258F%25E5%2592%258Cphpmyadmin%25EF%25BC%2589.html'; public $twitterURL = 'https://twitter.com/intent/tweet?text=MYSQL%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89&url=https%3A%2F%2Fwww.shan.info%2Fitem%2F123-mysql%25E6%25B7%25BB%25E5%258A%25A0%25E6%2596%25B0%25E7%2594%25A8%25E6%2588%25B7%25E5%2592%258C%25E6%2595%25B0%25E6%258D%25AE%25E5%25BA%2593%25EF%25BC%2588%25E5%2591%25BD%25E4%25BB%25A4%25E8%25A1%258C%25E6%25A8%25A1%25E5%25BC%258F%25E5%2592%258Cphpmyadmin%'; public $langTagForGP = ''; public $emailLink = '/component/mailto/?tmpl=component&template=gk_publisher&link=d1fffcc85bb661e3f25d33c7138a856b7428bdba' }; public $user = class Joomla\CMS\User\User { protected $isRoot = FALSE; public $id = 0; public $name = NULL; public $username = NULL; public $email = NULL; public $password = NULL; public $password_clear = ''; public $block = NULL; public $sendEmail = 0; public $registerDate = NULL; public $lastvisitDate = NULL; public $activation = NULL; public $params = NULL; public $groups = [...]; public $guest = 1; public $lastResetTime = NULL; public $resetCount = NULL; public $requireReset = NULL; protected $_params = class Joomla\Registry\Registry { ... }; protected $_authGroups = NULL; protected $_authLevels = [...]; protected $_authActions = NULL; protected $_errorMsg = NULL; protected $userHelper = class Joomla\CMS\User\UserWrapper { ... }; protected $_errors = [...]; public $aid = 0; public $gid = 1 }; public $params = class Joomla\Registry\Registry { protected $data = class stdClass { ... }; protected $initialized = TRUE; public $separator = '.' }; public $pagination = class Joomla\CMS\Pagination\Pagination { public $limitstart = 0; public $limit = 10; public $total = 0; public $prefix = ''; public $pagesStart = 1; public $pagesStop = 0; public $pagesCurrent = 1; public $pagesTotal = 0; public $hideEmptyLimitstart = FALSE; protected $viewall = FALSE; protected $additionalUrlParams = [...]; protected $app = class Joomla\CMS\Application\SiteApplication { ... }; protected $data = NULL } }, $method = 'display', $id = ???, $wrkarounds = ??? ) | .../BaseController.php:663 |
13 | 0.2066 | 15165096 | K2ViewItem->display( $tpl = ??? ) | .../ViewController.php:102 |
14 | 0.2492 | 18467504 | K2ViewItem->display( $tpl = NULL ) | .../view.html.php:742 |
15 | 0.2492 | 18467504 | K2ViewItem->loadTemplate( $tpl = NULL ) | .../HtmlView.php:230 |
16 | 0.2502 | 18669552 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php ) | .../HtmlView.php:701 |
- Published in 主机
- Read 3546 times
( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0004 | 406752 | {main}( ) | .../index.php:0 |
2 | 0.0533 | 4928928 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0533 | 4928928 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.1896 | 13312040 | Joomla\CMS\Application\SiteApplication->dispatch( $component = ??? ) | .../SiteApplication.php:233 |
5 | 0.1900 | 13336904 | Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_k2', $params = ??? ) | .../SiteApplication.php:194 |
6 | 0.1905 | 13392256 | Joomla\CMS\Component\ComponentHelper::executeComponent( $path = '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:377 |
7 | 0.1906 | 13423736 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php ) | .../ComponentHelper.php:402 |
8 | 0.1962 | 13829200 | K2ControllerItem->execute( $task = '' ) | .../k2.php:64 |
9 | 0.1962 | 13829200 | K2ControllerItem->display( $cachable = ???, $urlparams = ??? ) | .../BaseController.php:710 |
10 | 0.2026 | 14685728 | K2ControllerItem->display( $cachable = TRUE, $urlparams = ['id' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ) | .../item.php:78 |
11 | 0.2026 | 14685728 | K2ControllerItem->display( $cachable = TRUE, $urlparams = ['id' => 'INT', 'print' => 'INT', 'lang' => 'CMD', 'Itemid' => 'INT', 'm' => 'INT', 'amp' => 'INT', 'tmpl' => 'CMD', 'template' => 'CMD'] ) | .../controller.php:19 |
12 | 0.2055 | 15144728 | Joomla\CMS\Cache\Controller\ViewController->get( $view = class K2ViewItem { public $document = class Joomla\CMS\Document\HtmlDocument { public $_links = [...]; public $_custom = [...]; public $template = NULL; public $baseurl = NULL; public $params = NULL; public $_file = NULL; protected $_template = ''; protected $_template_tags = [...]; protected $_caching = NULL; private $_html5 = NULL; public $title = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $description = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin) 一、命令行模式 首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。用户:phplamp用户数据库:phplampDB 1.新建用...'; public $link = ''; public $base = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $language = 'en-gb'; public $direction = 'ltr'; public $_generator = 'Joomla! - Open Source Content Management'; public $_mdate = ''; public $_tab = '\t'; public $_lineEnd = '\n'; public $_charset = 'utf-8'; public $_mime = 'text/html'; public $_namespace = ''; public $_profile = ''; public $_scripts = [...]; public $_script = [...]; protected $scriptOptions = [...]; public $_styleSheets = [...]; public $_style = [...]; public $_metaTags = [...]; public $_engine = NULL; public $_type = 'html'; protected $mediaVersion = '15dbf078d61dbbf76811992dd0143dd9' }; protected $_name = 'item'; protected $_models = ['itemlist' => class K2ModelItemlist { ... }, 'item' => class K2ModelItem { ... }]; protected $_basePath = '/var/www/vhosts/shan.info/httpdocs/components/com_k2'; protected $_defaultModel = 'item'; protected $_layout = 'item'; protected $_layoutExt = 'php'; protected $_layoutTemplate = '_'; protected $_path = ['template' => [...], 'helper' => [...]]; protected $_template = '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php'; protected $_output = NULL; protected $_escape = 'htmlspecialchars'; protected $_charset = 'UTF-8'; protected $_errors = []; public $baseurl = ''; public $addLink = NULL; public $inlineCommentsModeration = FALSE; public $item = class stdClass { public $id = '123'; public $title = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $alias = 'mysql添加新用户和数据库(命令行模式和phpmyadmin)'; public $catid = '38'; public $published = '1'; public $introtext = '<div id="msgcns!750E812099FE2A7!196" class="bvMsg">\r\n<p>MYSQL添加新用户和数据库(命令行模式和phpmyadmin)</p>\r\n<p>一、命令行模式</p>\r\n<p>首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。<br />注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。<br />用户:phplamp<br />用户数据库:phplampDB</p>\r\n<p>1.新建用户</p>\r\n<p>//登录MYSQL<br />@>mysql -u root -p<br />@>密码<br />//创'; public $fulltext = ''; public $video = NULL; public $gallery = NULL; public $extra_fields = NULL; public $extra_fields_search = ''; public $created = '2010-07-21 20:40:07'; public $created_by = '63'; public $created_by_alias = ''; public $checked_out = '0'; public $checked_out_time = '0000-00-00 00:00:00'; public $modified = '2013-01-05 12:22:38'; public $modified_by = '63'; public $publish_up = '2010-07-21 20:39:52'; public $publish_down = '0000-00-00 00:00:00'; public $trash = '0'; public $access = '1'; public $ordering = '9'; public $featured = '0'; public $featured_ordering = '0'; public $image_caption = ''; public $image_credits = ''; public $video_caption = ''; public $video_credits = ''; public $hits = '3546'; public $params = class Joomla\Registry\Registry { ... }; public $metadesc = ''; public $metadata = 'robots=\nauthor='; public $metakey = ''; public $plugins = ''; public $language = '*'; public $category = class TableK2Category { ... }; public $link = '/item/123-mysql添加新用户和数据库(命令行模式和phpmyadmin).html'; public $printLink = '/item/123-mysql添加新用户和数据库(命令行模式和phpmyadmin).html?tmpl=component&print=1'; public $tags = [...]; public $imageXSmall = ''; public $imageSmall = ''; public $imageMedium = ''; public $imageLarge = ''; public $imageXLarge = ''; public $attachments = [...]; public $rawTitle = 'MYSQL添加新用户和数据库(命令行模式和phpmyadmin)'; public $author = class Joomla\CMS\User\User { ... }; public $videoType = 'allvideos'; public $text = '<div id="msgcns!750E812099FE2A7!196" class="bvMsg">\r\n<p>MYSQL添加新用户和数据库(命令行模式和phpmyadmin)</p>\r\n<p>一、命令行模式</p>\r\n<p>首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。<br />注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。<br />用户:phplamp<br />用户数据库:phplampDB</p>\r\n<p>1.新建用户</p>\r\n<p>//登录MYSQL<br />@>mysql -u root -p<br />@>密码<br />//创'; public $event = class stdClass { ... }; public $jcfields = [...]; public $image = ''; public $imageWidth = '600'; public $comments = [...]; public $numOfComments = 0; public $nextLink = '/item/122-安装rpmforge-yum源.html'; public $nextTitle = '安装rpmforge yum源'; public $nextImageXSmall = ''; public $nextImageSmall = ''; public $nextImageMedium = ''; public $nextImageLarge = ''; public $nextImageXLarge = ''; public $previousLink = '/item/125-setup-subversion-client-programs.html'; public $previousTitle = 'Setup subversion client programs'; public $previousImageXSmall = ''; public $previousImageSmall = ''; public $previousImageMedium = ''; public $previousImageLarge = ''; public $previousImageXLarge = ''; public $absoluteURL = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $langTagForFB = 'en_GB'; public $langTagForTW = 'en-gb'; public $langTagForLI = 'en_GB'; public $sharinglink = 'https://www.shan.info/item/123-mysql%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89.html'; public $socialLink = 'https%3A%2F%2Fwww.shan.info%2Fitem%2F123-mysql%25E6%25B7%25BB%25E5%258A%25A0%25E6%2596%25B0%25E7%2594%25A8%25E6%2588%25B7%25E5%2592%258C%25E6%2595%25B0%25E6%258D%25AE%25E5%25BA%2593%25EF%25BC%2588%25E5%2591%25BD%25E4%25BB%25A4%25E8%25A1%258C%25E6%25A8%25A1%25E5%25BC%258F%25E5%2592%258Cphpmyadmin%25EF%25BC%2589.html'; public $twitterURL = 'https://twitter.com/intent/tweet?text=MYSQL%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%94%A8%E6%88%B7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%BA%93%EF%BC%88%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F%E5%92%8Cphpmyadmin%EF%BC%89&url=https%3A%2F%2Fwww.shan.info%2Fitem%2F123-mysql%25E6%25B7%25BB%25E5%258A%25A0%25E6%2596%25B0%25E7%2594%25A8%25E6%2588%25B7%25E5%2592%258C%25E6%2595%25B0%25E6%258D%25AE%25E5%25BA%2593%25EF%25BC%2588%25E5%2591%25BD%25E4%25BB%25A4%25E8%25A1%258C%25E6%25A8%25A1%25E5%25BC%258F%25E5%2592%258Cphpmyadmin%'; public $langTagForGP = ''; public $emailLink = '/component/mailto/?tmpl=component&template=gk_publisher&link=d1fffcc85bb661e3f25d33c7138a856b7428bdba' }; public $user = class Joomla\CMS\User\User { protected $isRoot = FALSE; public $id = 0; public $name = NULL; public $username = NULL; public $email = NULL; public $password = NULL; public $password_clear = ''; public $block = NULL; public $sendEmail = 0; public $registerDate = NULL; public $lastvisitDate = NULL; public $activation = NULL; public $params = NULL; public $groups = [...]; public $guest = 1; public $lastResetTime = NULL; public $resetCount = NULL; public $requireReset = NULL; protected $_params = class Joomla\Registry\Registry { ... }; protected $_authGroups = NULL; protected $_authLevels = [...]; protected $_authActions = NULL; protected $_errorMsg = NULL; protected $userHelper = class Joomla\CMS\User\UserWrapper { ... }; protected $_errors = [...]; public $aid = 0; public $gid = 1 }; public $params = class Joomla\Registry\Registry { protected $data = class stdClass { ... }; protected $initialized = TRUE; public $separator = '.' }; public $pagination = class Joomla\CMS\Pagination\Pagination { public $limitstart = 0; public $limit = 10; public $total = 0; public $prefix = ''; public $pagesStart = 1; public $pagesStop = 0; public $pagesCurrent = 1; public $pagesTotal = 0; public $hideEmptyLimitstart = FALSE; protected $viewall = FALSE; protected $additionalUrlParams = [...]; protected $app = class Joomla\CMS\Application\SiteApplication { ... }; protected $data = NULL } }, $method = 'display', $id = ???, $wrkarounds = ??? ) | .../BaseController.php:663 |
13 | 0.2066 | 15165096 | K2ViewItem->display( $tpl = ??? ) | .../ViewController.php:102 |
14 | 0.2492 | 18467504 | K2ViewItem->display( $tpl = NULL ) | .../view.html.php:742 |
15 | 0.2492 | 18467504 | K2ViewItem->loadTemplate( $tpl = NULL ) | .../HtmlView.php:230 |
16 | 0.2502 | 18669552 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php ) | .../HtmlView.php:701 |