<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Database &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/database/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Wed, 08 Dec 2021 08:10:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.12</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>Database &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How Can I use Substring function in MySQL data</title>
		<link>https://help.hostry.com/knowledge-base/how-can-i-use-substring-function-in-mysql-data/</link>
					<comments>https://help.hostry.com/knowledge-base/how-can-i-use-substring-function-in-mysql-data/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Mon, 06 Dec 2021 09:31:15 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=4457</guid>

					<description><![CDATA[Mysql database has many built-in functions. They are available for completely different purposes, one of which is the Substring function. This function actively works with the &#8220;row&#8221; data type and is used in database management to retrieve rows from tables. What is this line? A string is an aggregate combination [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Mysql database has many built-in functions. They are available for completely different purposes, one of which is the Substring function. This function actively works with the &#8220;row&#8221; data type and is used in database management to retrieve rows from tables. What is this line? A string is an aggregate combination of characters. For example, <strong>&#8220;Hello_World_from here&#8221;</strong> and <strong>&#8220;test345&#8221;</strong> are strings.</p>



<p>Substring is a special function that is used to return or extract a string from strings in any table. The general syntax looks like this:</p>



<pre class="wp-block-code"><code>SUBSTRING(string, start, length)</code></pre>



<p>In order for you to understand this function, you can take a table as an example and use the following commands to extract rows from it. We will open a terminal and type &#8220;mysql&#8221; to enter the MySQL environment.</p>



<pre class="wp-block-code"><code>sudo mysql</code></pre>



<p>Next, you should open the list of databases, all that you currently have in MySQL</p>



<pre class="wp-block-code"><code>show DATABASES;</code></pre>



<p>Next, you should open a database, for example with the name &#8220;sample database&#8221;:</p>



<pre class="wp-block-code"><code>SHOW TABLES;</code></pre>



<p>In the output, we can see that the company database contains only one table named &#8220;<strong><strong>Hello_World_from_here</strong></strong>&#8220;. We will now access this table to display its contents:</p>



<pre class="wp-block-code"><code>DESCRIBE Hello_World_from_here</code></pre>



<p>We can now display the contents of the table:</p>



<pre class="wp-block-code"><code>SELECT * FROM Hello_World_from_here</code></pre>



<p>We say that we want to extract the string <strong>&#8220;Hello&#8221;</strong> from the table using the Substring function, then we will use the code according to the syntax we discussed above, and we will use <strong>&#8220;AS ExtractString&#8221;</strong> to return a value in the form of a string from the table …</p>



<pre class="wp-block-code"><code>SELECT SUBSTRING(employee_name, 1, 5) AS ExtractString FROM Hello_World_from_here;</code></pre>



<p>This command is used as a terminal. This is necessary in order to fetch a row from a column named employee_name, start at the first character, and extract the next 5 characters. To understand this better, let&#8217;s say we want to extract 2 characters from the column named <strong>World_from_here</strong>, but it starts at the third character, so the command will be.</p>



<pre class="wp-block-code"><code>SELECT SUBSTRING(World_from_here, 1, 5) AS ExtractString FROM Hello_World_from_here;\</code></pre>



<p>This output will deal with extracting only &#8220;dr&#8221; and &#8220;xi&#8221;. In addition, a command will be run to retrieve the string.</p>



<pre class="wp-block-code"><code>SELECT SUBSTRING(“Hello”, +3, 2) AS World_from_here;</code></pre>



<p>So, what happened in the latest changes.</p>



<p>The terminal was requested to use a special MySQL function that returns string characters from the string &#8220;World&#8221; and starts at its third position from the start point, the + ve sign tells it to start at the start point and extract the next two characters. So, in the line &#8220;World&#8221;, if we start at the third position from the starting point, it will start with &#8220;d&#8221;, and if we extract two characters next to it, then it will be &#8220;dr&#8221;</p>



<p>Now, at the moment, you need to run the following command. This will now allow you to extract &#8220;ax&#8221; from the string &#8220;Maxim&#8221; using a starting point at the end of the string.</p>



<pre class="wp-block-code"><code>SELECT SUBSTRING(“Maxim”, -4, 2) AS World_from_here;</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-can-i-use-substring-function-in-mysql-data/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Drop a Database on MySQL</title>
		<link>https://help.hostry.com/knowledge-base/how-to-drop-a-database-on-mysql/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-drop-a-database-on-mysql/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 29 Dec 2020 09:08:43 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2899</guid>

					<description><![CDATA[MySQL is a Relational Database Management System that is known for being very easy to use, nice interface, and also fast. In this article, we will take a look at such database management techniques as deleting a database in MySQL. To get started with MySQL, open a terminal. First, check [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://www.mysql.com/"><strong>MySQL</strong></a> is a Relational Database Management System that is known for being very easy to use, nice interface, and also fast. In this article, we will take a look at such database management techniques as deleting a database in MySQL. To get started with <strong>MySQL</strong>, open a terminal. First, check your <a href="https://en.wikipedia.org/wiki/MySQL"><strong>MySQL</strong></a> version with the following command:</p>



<pre class="wp-block-code"><code>mysql - V</code></pre>



<p>Check for the latest up-to-date database version. If it is, then proceed to the step of checking the status of the system mysql.service. To do this, run the following command:</p>



<pre class="wp-block-code"><code>sudo systemctl status mysql</code></pre>



<p>If the service is not active, start the service</p>



<pre class="wp-block-code"><code>sudo systemctl start mysql</code></pre>



<p>After starting the service, connect to the MySQL client or log into the MySQL shell as the root user. If you do not have access to the root user account, replace <strong>“root”</strong> with your username</p>



<pre class="wp-block-code"><code>sudo mysql -u root -p</code></pre>



<p>After logging into MySQL, list the databases with SHOW DATABASES command:</p>



<pre class="wp-block-code"><code>SHOWDATABASES;</code></pre>



<p>After you have a list of databases, then you need to select the database in which you want to delete. If you want to drop an existing database, you can run a simple <strong>DROP DATABASE</strong> command along with the database name like this:</p>



<pre class="wp-block-code"><code>DROPDATABASE your_database_name;</code></pre>



<p>After deleting the database, you need to list the databases again, for this use the <strong>SHOW DATABASES</strong> command</p>



<pre class="wp-block-code"><code>SHOWDATABASES;</code></pre>



<p>Now it is possible to notice that the remote database no longer exists in MySQL.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-drop-a-database-on-mysql/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
